code: File toFile(URL url) {
          String urlstr = url.toExternalForm();
          if(!urlstr.startsWith("file:"))
              return null;
  
          //  File(String) does fs.normalize, which is really forgiving in fixing up
          // malformed stuff. I couldn't make the other URL.toURI() or File(URI) work
          // in all the cases that we test
          try {
              return new File(URLDecoder.decode(urlstr.substring(5),"UTF-8"));
          } catch (UnsupportedEncodingException x) {
              throw new AssertionError(x);
          }
      }
docs: /*package for test