Added flag to ignore deleted files. Prevents 'The file "$filename" couldn't be opened because there is no such file' error from being printed.
Diff is done from HEAD so that both staged and unstaged files are checked. This makes it easier to use in a pre-commit hook where the files you would want to be checked would already be staged.