Py3k compatibility fixes through six package.

The Py2.7 and 3.3 tests both pass with this version. Hopefully it did not introduce new bugs.