Display summary of errors at the end of the script.

Also add option to disable emails (for testing).

BB-153