Check for dirty files is not accurate

grep '^M' was not returning anything. In general diff-index and
ls-files are preferred to status --porcelain.
Merge pull request #826 from smarterclayton/git_check_wrong

Check for dirty files is not accurate