Make some simple changes for Python 3 compatibility.

With this commit, test status for Python 3.3 is 75 tests, 1 failure, 37
errors.