dir.c: replace is_path_excluded with now equivalent is_excluded API