Make sure we encode unicode strings to bytes before we pass them to urllib.quote
Properly support unicode

Issue #240