Fixed #8

We are not writing the output to the tmp file instead of creating the output under the testdata/