Catches unstaged modifications to staged files.

Solves a recurring issue with modifications based on pre-commit failures being unstaged.

@bernerdschaefer @peterbourgon