base64 py3 fixes.

Stopped being lazy and tested in a py3 virtualenv. Works For Me.