modify the behavior of git-ignore, now it will cd root to find .gitignore
Merge pull request #276 from spacewander/master

git-ignore will cd root to find .gitignore.
Fixes #277
Merge pull request #278 from tj/delete-submodule-fix

Fixes #277.