Base64 encode file