docs: @VisibleForTesting
      URI getBaseDir() {
          URI baseDir = job.getInputDir();
  
          final Collection<FileInfo> fis = job.getFileInfo();
          for (final FileInfo fi : fis) {
              final URI res = fi.result.resolve(".");
              baseDir = Optional.ofNullable(getCommonBase(baseDir, res)).orElse(baseDir);
          }
  
          return baseDir;
      }