py_codegen: Fix deprecated use of imp module.
Also, this changes an error message to use an '%r' format string for reporting the bytecode version magic, to avoid printing unreadable characters.
Also, this changes an error message to use an '%r' format string for reporting the bytecode version magic, to avoid printing unreadable characters.