public function setWorkingDirectory($path)
    {
        $path = $this->prefixDirectoryStack($path);

        if ($this->files->exists($path))
        {
            return $this->directoryStack[] = $path;
        }

        throw new DirectoryNotFoundException("Directory [{$path}] could not be found.");
    }