code: private static URL makeURLFromFilespec(final String filespec) throws IOException {
          String decoded = URLDecoder.decode(filespec, "UTF-8");
          File file = new File(decoded);
          // make sure it is canonical (no ../ and such)
          file = file.getCanonicalFile();
  
          return file.toURI().toURL();
      }
docs: A helper to make a URL from a filespec.