Added --format --to-file --output-file options

--format        can be junit or tap
--to-file       If it is set the output is written to a file
--output-file   name of the output file [default: testresults.xml]