Without being there, this could be off base, but it sounds a little overly confrontational at the start. Even when I was being threatnted by guys serving, I tried to maintain that level of professionalism. Instead of "NO" I might have said, "Sorry (sir, mam, brother etc.) its time to go - you don't have permission to be here, and you have to leave." I try to keep the sir's, mams, or some sort of identifying word in there. Anything further would just be "hey man, these are the rules I have to follow, I don't want have to call police to take care of this."
Not saying you did anything wrong, but it seems like your taking precautions for a felony stop ;p when its a homeless guy sleeping on the ground. I guess it's good and bad - it may have added a bit of extra tension to the situation.
I also don't lock the car until I know there is a threat or a problem (I may have to get in it, and I don't want the woman to forget to unlock it ^_^ ).
Just my .02