code: private String maybeAddTrailingSlash(String key) {
      if (!key.isEmpty() && !key.endsWith("/")) {
        return key + '/';
      } else {
        return key;
      }
    }
docs: Turns a path (relative or otherwise) into an COS key, adding a trailing "/"
  if the path is not the root <i>and</i> does not already have a "/" at the
  end.
  
  @param key COS key or ""
  @return the with a trailing "/", or, if it is the root key, "",