Added support for Python 3

Now works under Python 3.4.2, with backward compatibility retained. For supporting both Python 2.7 & Python 3 sanely, tox and test coverage is needed.