add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse