Cleaned up the base64 bytestring juggling.

--HG--
extra : amend_source : 93166609138bcd5abe68f1e16930df20790878f5