public function addPath($path)
    {
        $trimmed = rtrim($path, '/');
        if (!in_array($trimmed, $this->paths)) {
            $this->paths[] = $trimmed;
        }
        return $this;
    }