Drop TESTNAME sanity check and make it not overwritable
Make PREFIX not overwritable, too
Use File::Temp for BASENAME and make it now overwritable, too