Support Python 3k

This adds support for Python 3 (closes #23). Python >= 2.6 is also supported.