Utilities to help with testing command line scripts