Added more functionality to directory_2_hash