Fixes UnicodeEncodeError with non-ascii url data

urllib.urlencode doesn't like unicode values, so use instead Django' urlencode (https://docs.djangoproject.com/en/dev/ref/utils/#django.utils.http.urlencode)