anchor.diff:      _logEvent("Starting Safari browser on: $url");
       return allowPopUps().then((success) {
         if (!success) {
  -        return new Future.immediate(false);
  -      }
  -      return clearCache().then((_) {
  +        return false;
  +      }
  +      return clearCache().then((cleared) {
  +        if (!cleared) {
  +          _logEvent("Could not clear cache");
  +          return false;
  +        }
           // Get the version and log that.
           return getVersion().then((version) {
             _logEvent("Got version: $version");
  
positive.code:    */
    const String versionFile = "/Applications/Safari.app/Contents/version.plist";
  
    Future<bool> allowPopUps() {
      var command = "defaults";
      var args = ["write", "com.apple.safari",
  
negative.code:     });
    }
  
    Future<bool> deleteIfExists(Iterator<String> paths) {
      if (!paths.moveNext()) return new Future.immediate(true);
      Directory directory = new Directory(paths.current);
      return directory.exists().then((exists) {
        if (exists) {
          _logEvent("Deleting ${paths.current}");
          return directory.delete(recursive: true)
  	    .then((_) => deleteIfExists(paths))
  	    .catchError((error) {
  	      _logEvent("Failure trying to delete ${paths.current}: $error");
  	      return false;
  	    });
        } else {
          _logEvent("${paths.current} is not present");
          return deleteIfExists(paths);
        }
      });
    }
  
    // Clears the cache if the static deleteCache flag is set.
    // Returns false if the command to actually clear the cache did not complete.
    Future<bool> clearCache() {
      if (!deleteCache) return new Future.immediate(true);
      var home = Platform.environment['HOME'];
      Iterator iterator = CACHE_DIRECTORIES.map((s) => "$home/$s").iterator;
      return deleteIfExists(iterator);
    }
  
    Future<String> getVersion() {
  