Encode to utf8 before quoting urls

Fixes #315.  Note that python3 works without this commit,
but python2 fails.
Merge branch 's3-unicode-copy' into develop

* s3-unicode-copy:
  Encode to utf8 before quoting urls