client: bug fixes.

- don't exit when reading reply from server fails. This could cause
  server start to fail.

- don't add read return value twice in read loop. ouch! Could cause
  server reply parsing to fail.
missing static keyword.
fix typo in comment.
cleanup check for running server.