Fix synchronization - leftover from refactoring
[TEST] Close node env otherwise windows can't delete tmp files
Prevent double wrapping directories in MockDirectoryWrapper