Required reading! Here's a story of a determined TSA resister who won, and passed a TSA checkpoint without being searched, just through patience and stubbornness.
http://noblasters.com/post/1650102322/my-tsa-encounter
They can not force you to undergo a search after you get off the plane if all you want to do is exit the airport. Though it's a little strange that your checkpoint was before customs; I think in the story above the guy had already passed through customs when the TSA tried to violate him.