FIX dangling file handles in various tests

* Multiple tests were throwing 'unable to unlink' warnings (under Win32)
* Test directories/files were undeletable because IO objects were not being closed prior to attempting deletion

* Scoping braces were used to simply enable the IO auto-close functionality prior to the directory/file deletions
  - io->close() could have been easily used in some cases, but others were not as obviously repaired; so... scoping instead

This repairs all the test warnings I get when testing on Win32 systems.