Enumerating event flags inadvertently broke gfx.py. This appears to fix it.
This is an alternative to terrible hacks like filename metadata, and might combat submodule bloat.
also fixed some problems with gfx.py: - choking on filenames in graphics conversion - faulty 'repeat' method in the compressor