Test: tools: overhaul CLI regression test
Validate command-line arguments better, improve usage text, replace nonworking
-? option with --help, make --verbose option actually do something, remove
unhelpful -x option, retab according to style, and use good shell programming
practices.