Generating correct base64 output in Linux