My rule in these situations is to be calm, polite but firm. Being confrontational or even being nervous is likely to make the situation worse. I've had a situation where an overzealous agent became increasingly agitated with me but I just stood my ground. Eventually a supervisor came over and "relieved" him of the inspection and I was on my way in a few minutes. Most times I don't get that much grief from customs, except in Japan where they very politelly grill me and insist on opening one or more of my bags.
On a separate note but kind of related. I had a QF agent feak out when I wanted to reissue one of my RTW's that I had stopped part way in the U.S. I was in the Sydney QF office and she started berating me that using coupons out of order was illegal and I would have to pay the full fare for the segments I used to get to Australia. I pulled out my two other RTW's and a Circle Pacfic (all partially used) and suggested she might like to go through them to check that I had in fact arrived in Sydney legally. At that point she practically bent over backwards to do all the changes I wanted - not even checking the rule book!