Don't try to kill child process if it has no pid

If we try that, the agent ends up killing itself instead. Oops!
Merge pull request #163 from guidow/bugfix_dont_kill_self

Don't try to kill child process if it has no pid