Add support for listing failed files to stderr in --test mode.

Add git pre-commit script.