python base64 encode file to string