Fix pruning
Turns out that relying on the '.git' file is not reliable. We will instead look for a '.git' directory to prune
closes #3853
Merge pull request #4088 from permcody/test_harness_fix

Fix pruning