Fix Python compatibility issues with querystring encoding and decoding (Python 2 & 3)

Notably, saving pages with unicode characters now works again in Python 2