Modified DirectoryTraversal to use countsLock and filesLock.