docs: public String commandsWritingDataTo(File dataDirectory) throws IOException {
      final Map<DatafileReference, File> refsToFiles = Maps.newHashMap();
      for (final DatafileReference datafileReference : datafileReferences) {
        final File randomFile = File.createTempFile("plotBundle", ".dat", dataDirectory);
        randomFile.deleteOnExit();
        refsToFiles.put(datafileReference, randomFile);
        Files.asCharSink(randomFile, Charsets.UTF_8).write(datafileReference.data);
      }
  
      final StringBuilder ret = new StringBuilder();
      for (final Object commandComponent : commandComponents) {
        if (commandComponent instanceof String) {
          ret.append(commandComponent);
        } else if (commandComponent instanceof DatafileReference) {
          final File file = refsToFiles.get(commandComponent);
          if (file != null) {
            ret.append(file.getAbsolutePath());
          } else {
            throw new RuntimeException("PlotBundle references an unknown data source");
          }
        } else {
          throw new RuntimeException("Unknown command component " + commandComponent);
        }
      }
      return ret.toString();
    }