Fixed file transfers

Added protocol to TCP sockets so that files will
transfer correctly.