Fix unicode problems in build_plugin_url

urllib.urlencode() didn't handle unicode characters in parameters. Fixed
by looping through params and converting unicode keys to utf-8 Also
forced an error if the string is any encoding but utf-8