fix b64-handling of data in Python 3

data comes in as b64 unicode, must be converted to b64 bytes then decoded to the original bytes.