Add some tests and optional positional argument for main input file basename