Fix inability to close pipe in "expecting chunk" state

When doing a blocked read and EINTR occurs, the server state
was stuck in expecting chunk, and would't accept a close
command.

Fixes #27