public function makeAbsolutePath($path, $prefix)
    {
        if (
            substr($path, 0, 1) == '/' || // unix root
            substr($path, 1, 2) == ':\\' || // windows root
            substr($path, 0, 2) == '~/' || // unix home directory
            substr($path, 0, 2) == '\\\\' || // windows network location
            preg_match('|^[a-z]+://|', $path) // url
        ) {
            return $path;
        } else {
            if (substr($path, 0, 2) == './') {
                $path = substr($path, 2);
            }
            $absPath = $this->fixPath($prefix).$path;
            $count = 1;
            while ($count > 0) {
                $absPath = preg_replace('|\w+/\.\./|', '', $absPath, -1, $count);
            }

            return $absPath;
        }
    }