py: Fix bugs with debugging output.

show_bc now decodes the prelude correctly.  Moved WRITE_FILE stuff from
runtime.c to emitglue.c.

Addresses issue #385.