File the autoFiles cleanup routing

This fixes the file clean up routine, as there are some cases where calling destroy on a writable stream will close the file immediately and the following code will not delete the file since it now looks like the file was never opened.

In addition, this includes a commit that tests that the clean up routine functions correctly, and it even fails before the fix commit, which is how the issue was discovered.

Fixes #58