Complaints about unprofessional and rude behavior by a Building Code Official should be addressed to your local municipal council. They are usually happy to assist in resolving such complaints and happy to known when their hired or contract inspectors and code officials are not doing their jobs properly.
Pennsylvania Law permits emergency repairs to proceed without a permit provided that the contractor or building owner applies for a permit within 3 business days of the emergency repair work.