Added tests; the tool now output a file based on arguments instead of cout