Implemented base64 encoding for non "text/html" file types.