Closes file descriptor (?) and -> info to client

- Forgot to close the file descriptor obtained through os.Open
- Found a way to discriminate directories from files