Issue #12004: Fix an internal error in PyZipFile when writing an invalid
Python file.  Patch by Ben Morgan.
Closes issue 15505. unittest.installHandler and non-callable signal handlers.