Python 3 and OS X compatibility

Three changes happened:
* I ran 2to3 for some trivial changes