Fix patch server and finish sending files.

In terms of functionality, the patch server is 100% finished! The
bug causing the client to crash was the result of my passing the
little endian version of the length to the send function instead
of the host byte order length variable.