I ask myself, does this betrayal suggest that my friendship isn't as important to this person as (x). X can be money, sex, fame, which ever. If the answer is yes, and it usually is, the person is cut out of my life. Since most people are willing to step on your head for the sake of their own interests, I am left with an extremely small group of friends, but quality is better than quantity.
When meeting new people I give them the benefit of the doubt, but pay attention to their stories. If they brag to me about betraying someone else, stealing from someone, or otherwise screwing them over for personal gain, I don't give them a chance to do the same to me. Petty people are usually unable to resist bragging.