Duracloud: Coerce all strings to byte strings

refs #7694

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.