search_for_subdir(): return (ref_dir *) instead of (ref_entry *)