code: private static String encode(String pathElement) {
          try {
              return URLEncoder.encode(pathElement, Charsets.UTF_8.name());
          } catch (UnsupportedEncodingException e) {
              throw Throwables.propagate(e); // Should never happen
          }
      }
docs: URL encodes a path element