Make some simple changes for Python 3 compatibility.

With this commit, test status for Python 3.3 (`tox -e py33`) is 75 tests, 1 failure, 37 errors.