Added support for Python3.

This pull request adds support for Python 3. It should fix issue #7.