integrate dir_hash from dir_reader.rb