Only attepting to kill if @pid is not nil

Corrects Ruby error when attempting to kill the WebKit browser once it's already dead.