URL Encoder written in Python