Be more precise when dealing with syswrite errors

Signed-off-by: Pedro Melo <melo@simplicidade.org>
Make sure quit() doesn't die if we fail to send the command:

The end result is the same - the socket connection is down - so make sure
we cleanup properly but don't bother with errors in the process.

Closes #30.

Signed-off-by: Pedro Melo <melo@simplicidade.org>