Fixed test on .git and HEAD in recursion scan.