Correctly detect write errors while creating CMS objects.
* src/cms.c (write_encrypted_cont): Take care of write errors.
Without that patch libskba would for example keep on writing on a full
disk because the write error gets overwritten by the read result. No
real harm but we should stop as soon as possible and report the
correct error.