code: private static String getAbsolutePath(String directory) {
          String realPath = Paths.get(directory).toAbsolutePath().toString();
          String separator = FileSystems.getDefault().getSeparator();
          if (!realPath.endsWith(separator)) {
              realPath += separator;
          }
          return realPath;
      }
docs: Returns the absolute path for the given {@code directory}.
  <p>
  The path is terminated with a separator.
  
  @param directory the directory whose path will be made absolute
  @return the absolute path for the given {@code directory}, terminated with a separator
  @since 2.4.0