Fail on failed write (e.g. pipe).
Merge pull request #10 from smblott-github/write-fail

Fail on failed write (e.g. pipe).