Support Python 3.

Closes #31.
Merge pull request #34 from square/jw/python3

Support Python 3.