Revert "Made file writing tests use a local file."

This reverts commit 95b688da10eae3c7079a14d2242b111f3a21f7e7.
Now removing the temporary file after.
Using setlocal hidden because Travis is whining.