Revert "base64.encodestring issue in python3"

This reverts commit cee4c647016d63f635f5d51e786008c65b76fdb4.