autobalance: add test mode and respect it with better output.  Adjust test.pl.