Test if path ends with index_file, not *is* index_file.