Fix for #24 -- file descriptors for sockets were getting left open