Fixed zpipes client to handle write errors

Fixes #43