Added an escape for the output file path and the stderr file path so paths with spaces in them work.