Support Python 3.

Closes #31.