Duracloud: Coerce all strings to byte strings

Base64 and percent encoding assume that strings are strs, not unicode. Also, str.replace() behaves poorly if the string and the replacement strings are not the same type of string.

refs #7694