Make PathExtensions tests use mock file system

So that they do not depend on the presence of physical files and
directories (which are unlikely to exist on the build server)