public function setWorkingDirectory($workingDirectory)
    {
        if ((null !== $workingDirectory) && !is_dir($workingDirectory)) {
            throw new InvalidArgumentException('The working directory must exist.');
        }

        $this->workingDirectory = $workingDirectory;

        return $this;
    }