Sounds to me like the client may have a hidden agenda and they are engaging in a little 'misdirection' in order to put blame.
Entirely likely and not at all unusual when a manager thinks someone doesn't fit or their work isn't up to snuff. They often don't realise that they don't need an excuse to dump a contractor.
Of course if the person really doesn't fit at all and the client isn't prepared to pay notice they do fabricate a mythical gross cause unless they have a real one to use.
Only you know if you were the office pervert ( I have not come accross an office pervert in 14 years .. they just don't exist anymore) .. but if they are complaining about a bit of 'cheeky banter' with women then that is unacceptable.
At what point does "cheeky banter" cross the line to the female being bantered? Only the recipient knows and will probably not comment to the banteree, but to their Manager. Never ever run the risk of complaints that's basic protecting your own arse as a contractor since we're so easy to dump.
With regards the lateness of deliverables .. well that happens on any project, why are they being so damned abrupt about it ? why don't they sit down and try and work it out with you ?
That can certainly be the case, but if the client hasn't been made aware that deliverables are likely to be late in reasonable time then it's just a failed deadline. Being late is NOT what we get paid for as contractors, I've dumped contractors for missing deadlines without managing my expectations in the past as it come across as incompetance.
I think to my mind it could be an individual on the client side that bears a grudge towards you.
Possibly in which case that person will probably be senior and his perm colleagues will probably back his word. Pointless fighting that.
Buy a BT Big Button telephone with speaker phone from Argos, get a recording device ready and call your agent up and try and get them to utter some liablous quotations from the client's daming e-mail then take them to court.
Which will be a case of his word against theirs and they can bring statements from staff with complaints and evidence of deadlines missed. This course of action would at best be an expensive folly and at worst could cost a fortune (as the client will go for costs and can hire as expensive a lawyer as they like) and get his name spread about as a pain in the nads.
My advice is cut your losses, mark it down to experience, learn from the experience and forget the whole thing and get a new gig.
Ken of course the agent is working with the client and it's possible you've been shafted, but never forget the agent works for the client and not you as the client has the
MONEY. There are almost no circumstances where the agent will act for you over the agent.