Urlencode to prevent wrong redirects

Fixes #5