Encode quote safe characters
Python 3 support for tests
Merge pull request #21 from dasevilla/python3-tests

Fix Python tests, add Python 3 support