Error output for tools

Adds a non-zero status code for tools reporting errors and direct all
such output to stderr.