#56: Add support for Python 3.

Applied 2to3.