Add test for functionality of match_by_dir_name