function joinPath(base, part) {
  if (!part) {
    return base;
  }

  if (isRemote(base)) {
    return urlResolve(base, part);
  }

  return path.join(base, part.replace(/\?.*$/, ''));
}
Path join considering urls
@param {string} base Base path part
@param {string} part Path part to append
@returns {string} Joined path/url