Depend on the known behaviour of URLs for nonexistent files rather than the undefined behaviour of URLs for directories (which fails on Windows). The test isn't about file: URLs at all, so the URL used doesn't really matter.