Bug #583486, close the current-dir file descriptor
This code path is triggered when you are given a bunch of files rather than directories to commands like 'commit' and 'status'. It would try to check for files in each path passed in, and leak a file descriptor for each one that was not a directory.