Support locking (and unlocking) a .git/index through DirCache