1) Always source revision your code, free private repos are available at bitbucket.
2) Never work without compensation
3) Preferably make a contract
4) Agree to incremental delivery or milestones
5) Prepare regular invoices
6) Follow up on outstanding invoices
7) be strict about getting paid, on time, or fire the client
You may be good at what you do, but that doesn't help if you screw up the business part of freelancing.