attachments: Fix error while saving a message to disk or network

If the user tries to save a message to disk or network share without
enough user rights to write the message Icedove fails silently. This
backport from TB 21 fix this.