Actually, I'd say your chances of getting your money to someone who needs it is better if you give to a random panhandler than if you give to a "non-profit" organization. A whole of a lot of NPOs are scams. Even the bigger ones like United Way have scammish tendencies.
For example, with United Way IIRC about one-third of all cash donations end up in the hands of executives. So if you donate $100 to United Way, approximately $33 will not be going to help anyone. And really, United Way is one of the more honest NPOs.
Donating to an actual person or a specific cause is a much better way to ensure your money actually reaches someone who needs it. Going through a NPO middlemen only helps their executives get rich.
And back to an original point, I'm confident that the percentage of panhandlers who don't actually need the money is less than the percentage of money skimmed off the top of your average NPO.