Various improvements to test script command line options, i.e. --type