Fix #23; get parse.py at least mostly working under Python 3.

This could badly do with refactoring; it's likely with some set of
options this will still not work.