public static function addPath ($path, $prefix = '', $priority = 0)
	{
		if (substr ($path, -1) !== '/')
			$path .= '/';

		if ($prefix) {
			$name = $prefix . '|' . $path;
		}
		else {
			$name = $path;
		}

		// Set priority
		self::$pathpriorities[$name] = $priority;

		// Calculate the position based on priority.
		$position = 0;
		foreach (self::$paths as $path)
		{
			if (self::$pathpriorities[$path] < $priority)
			{
				break;
			}
			$position ++;
		}

		array_splice (self::$paths, $position, 0, array ($name));
	}