anchor.diff:      log.io("Finding versions of ${ref.name} in "
           "$systemCacheRoot/${_urlToDirectory(server)}");
   
  -    var dir = path.join(systemCacheRoot, _urlToDirectory(server));
  +    var dir = p.join(systemCacheRoot, _urlToDirectory(server));
   
       var versions;
       if (dirExists(dir)) {
         versions = await listDir(dir).map((entry) {
  -        var components = path.basename(entry).split("-");
  +        var components = p.basename(entry).split("-");
           if (components.first != ref.name) return null;
           return HostedSource.idFor(
               ref.name, new Version.parse(components.skip(1).join("-")),
  
positive.code: /// This behavior is a bug, but is being preserved for compatibility.
  String _urlToDirectory(String url) {
    // Normalize all loopback URLs to "localhost".
    url = url.replaceAllMapped(new RegExp(r"^https?://(127\.0\.0\.1|\[::1\])?"),
        (match) => match[1] == null ? '' : 'localhost');
    return replace(url, new RegExp(r'[<>:"\\/|?*%]'),
        (match) => '%${match[0].codeUnitAt(0)}');
  }
  
negative.code:     var failures = [];
  
      for (var serverDir in listDir(systemCacheRoot)) {
        var url = _directoryToUrl(p.basename(serverDir));
        var packages = _getCachedPackagesInDirectory(p.basename(serverDir));
        packages.sort(Package.orderByNameAndVersion);
  
        for (var package in packages) {
  