Fix unicode error in URI paths

If a key name is provided that is unicode we need to
encode the path components before sending it to quote().
Merge branch 'utf-8-fix' into develop

* utf-8-fix:
  Fix unicode error in URI paths