[TEST] Close node env otherwise windows can't delete tmp files
Prevent double wrapping directories in MockDirectoryWrapper
Use Store#tryIncRef when running check index
add catch bock back that got lost during merge