Use git rev-parse instead of git log --format=%H.

This is a little cleaner and it's better to rely on git plumbing than on
porcelain.
Use git diff-index to check for dirty index.
Fix output to go to stderr.
Use git-diff-tree to determine differences.
Add some more ignore files, mainly for future composer stuff.
Default getFiles to working directory.
Only show changes for tracked files.
Handle quiet output without duplicate code.