Python 3 compatibility fixes for the test suite.

These changes will allow "make check" to run as long as the python binary is at least version 2.6, including python 3.
Merge pull request #10 from Yawning/test_python_compat

Python 3 compatibility fixes for the test suite.