debugging sockets, adding functionality to send entire directory