Simplified client substantially.

Instead of keep having to read from a socket, we use the `makefile' function on
a socket to give us a file interface so we can just loop over all of the lines
that the socket gives us. No more polling for a magic number and worrying about
this crap.