Match paths against .gitignore rules and walk a tree the way git does, checked against git check-ignore.