protected function processDir($dir) {
    $dir = $this->replacePattern($dir);
    // The absolute path has to be calculated relative to the configuration file
    if (Path::isRelative($dir)) {
      $dir = Path::makeAbsolute($dir, dirname($this->configFile));
    }
    return rtrim($dir, '/');
  }