python base64 encode file contents