Migrate client scripts to Python.
Get rid of unnecesary newline at the end of responses.
Add a 2-byte header (network byte order) with the length of the message to the protocol.