Don't lock the DirCache if you are simply reading and unlocking, its sort of a waste of time.  Use read() if all you need is to look at it.

But, I have to question, why is this block here?  If the file doesn't exist in the working tree, and yet we were told to add it, we have nothing to do, don't we?  That is `rm foo; git add foo` doesn't stage the deletion.  We probably don't want to do that here either.