code: private static String ensureSuffix(String path, String suffix) {
          if (path.endsWith(DOT + suffix))
              return path;
          return path + DOT + suffix;
      }
docs: Ensures a suffix on a file output if the path doesn't
  currently end with it. For example calling
  {@code writeTo(SVG_FMT, "~/chemical")} would create a file
  {@code ~/chemical.svg}.
  
  @param path   the file system path
  @param suffix the format suffix
  @return path with correct suffix