Prevent infinite loop if the GnuPG subprocess dies while we're trying to write. See PHP Bug #39598.
Merge pull request #5 from gauthierm/fwrite-error

Prevent infinite loop if the GnuPG subprocess dies while we're trying to...