Added connection close protocol

When there are no open files, the connection closes. This is obviously
retarded, but that's the way they wanted us to do this for some reason.
Merge branch 'master' of github.com:faiq/distributedfiles