'When connection is made, create the AMP protocol instance.'

def connectionMade(self):

    self._ampProtocol.makeConnection(LocalWorkerTransport(self.transport))
    if (not os.path.exists(self._logDirectory)):
        os.makedirs(self._logDirectory)
    self._outLog = open(os.path.join(self._logDirectory, 'out.log'), 'w')
    self._errLog = open(os.path.join(self._logDirectory, 'err.log'), 'w')
    testLog = open(os.path.join(self._logDirectory, self._logFile), 'w')
    self._ampProtocol.setTestStream(testLog)
    logDirectory = self._logDirectory
    if isinstance(logDirectory, unicode):
        logDirectory = logDirectory.encode('utf-8')
    d = self._ampProtocol.callRemote(workercommands.Start, directory=logDirectory)
    d.addErrback((lambda x: None))
