Per JENKINS-24849 added a catch exception block when CmdRunner is
released in APISession.Terminate()