Python 3 support with Python 2 support

Thanks to your commit following #4, I see that the stdin/stdout story now works as well. I've made three more changes, one to remove a superfluous backslash, another to restore Python 2 support for Python 2.6+, and finally adding the Trove classifiers. Please consider accepting this pull request and making a new release to PyPI. Thanks.