pre-commit-hook.py: Print only the tests that fail/crash.

Otherwise the spam is only going to get worse.
Emitter: Simplify template matching by a little bit.