don't write file if opening a stream to encrypt the data fails
Merge pull request #7929 from owncloud/enc_dont_write_file_if_enc_fails

don't write file if opening a stream to encrypt the data fails