py3k fixes

Just a few small changes so it installs cleanly in Python 3.x.