Fix reading directory, and verify path hashes