I'm more and more sensitive to this claim that miscreants in "foreign countries" are incompetent and dishonest. If the project fails, it's a 1% chance someone ripped you off. It's a 99% chance that you don't know how to manage a software development project. I have probably done 25-30 projects using talent from Eastern Europe and Asia. I've had $1,000 projects fail and $250,000 projects fail. In all cases, I assume the responsibility for not having requirements clear enough, not managing the process close enough or simply choosing the wrong type of developer.
If you can afford to hire locally and can find the resources, then do that. Otherwise:
1. Find a local technical resource that you trust and have them help you through the process. Even if they can give you 4 hours/week... that'll dramatically increase the probability of success. Without this, your odds of success go down dramatically.
2. Know that the less money you spend, the more management you'll need to provide. This is not always a bad thing. I vastly prefer working directly with individuals and 2-3 person shops than large firms who have multiple layers of management with lots of opportunity for miscommunication and unnecessary overhead.
3. Start with a small project. You can learn a ton about a contractor in a week. See how you communicate and how the project is delivered. If things go slightly squishy that first week, then move on.
4. Dictate the technology stack if you can. Then you can filter by those that have the right skills and reduce the chance you're left with some antiquated stack.
5. Have lots and lots of milestones/deliverables. Projects with one or two deliverables always end poorly.
6. Talk every day. Build rapport. You get better quality work from people who like you.
7. Make sure everything's checked into Github regularly
To mitigate risk if you're on Elance et al, is just work with companies that have > 4.8 stars and at least a dozen projects. They can still fail if you don't manage the process well, but at least you have basic understanding of their capabilities. These services provide escrow and you can even claw back payments in some cases.
Your real risk is wasting your time. Competence can be an issue, but nobody is out to rip you off.