IO: Fixed IO root dir in integ tests

Both API & SPI will now use a temporary folder as $rootDir.

Testing of existence of files has also been made more accurate.