Added --to-file, --format and --output-file options

--format can be "junit", "tap" or empty
--to-file has to be set to write to an output file
--output-file path to the output file [default: testresults.xml]