Fix base64 decoding bug and add support for Cloud Keychain files