browserBasePath = basePath => {
  let path = `${basePath || '/'}`
  if (!path.startsWith('/') && path.indexOf('://') < 0) {
    path = '/' + path
  }
  return path.endsWith('/') ? path : path + '/'
}
Ensure leading and tailing slash. Allow base path with schema like http://foo.com/bar