Improved debugging in midifiles.py. Can now be turned on with debug().