Python 3 support

* Use print function (supported back to Python 2.6)
* Versioned import for urllib.quote / urllib.parse.quote
* Updated except syntax
* Declare a file encoding
* Bump version number