public function execute($command, array $arguments = array(), $cwd = null)
    {
        $arguments += $this->getGlobalArguments();

        try {
            $result = $this->adapter->execute($command, $arguments, $cwd);
        } catch (\Exception $e) {
            // @todo move to a generic error handler? Something similar to the ParserInterface
            if (preg_match('/url \'[^\']+\' non-existent/i', $e->getMessage()) ||
                preg_match('/file not found/i', $e->getMessage()) ||
                preg_match('/path not found/i', $e->getMessage())
            ) {
                throw new NotFoundException($e->getMessage());
            }

            throw $e;
        }

        return $result;
    }