more robust exit_code handling for ssh interface
more robust exit_code handling for ssh interface

Background processes may produce output on STDOUT. This could get
captured when obtaining the result of "echo $?" to get previos command's
exit code. So it's not safe to assume that output will always be an int.
Attempt to strip out superflous output before doing the int conversion
and, on failure, log a warning but don't error out.

Sticklyman1936/workload-automation,lisatn/workload-automation,jimboatarm/workload-automation,ARM-software/workload-automation,chase-qi/workload-automation,freedomtan/workload-automation,bathepawan/workload-automation,ep1cman/workload-automation,bathepawan/workload-automation,ep1cman/workload-automation,muendelezaji/workload-automation,chase-qi/workload-automation,freedomtan/workload-automation,muendelezaji/workload-automation,freedomtan/workload-automation,ep1cman/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,bathepawan/workload-automation,muendelezaji/workload-automation,JaviMerino/workload-automation,JaviMerino/workload-automation,setrofim/workload-automation,jimboatarm/workload-automation,lisatn/workload-automation,Sticklyman1936/workload-automation,ep1cman/workload-automation,muendelezaji/workload-automation,JaviMerino/workload-automation,freedomtan/workload-automation,bjackman/workload-automation,muendelezaji/workload-automation,jimboatarm/workload-automation,ARM-software/workload-automation,JaviMerino/workload-automation,bjackman/workload-automation,bathepawan/workload-automation,setrofim/workload-automation,bathepawan/workload-automation,Sticklyman1936/workload-automation,freedomtan/workload-automation,freedomtan/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,chase-qi/workload-automation,chase-qi/workload-automation,ep1cman/workload-automation,chase-qi/workload-automation,JaviMerino/workload-automation,Sticklyman1936/workload-automation,JaviMerino/workload-automation,setrofim/workload-automation,lisatn/workload-automation,lisatn/workload-automation,muendelezaji/workload-automation,jimboatarm/workload-automation,Sticklyman1936/workload-automation,ep1cman/workload-automation,ARM-software/workload-automation,bathepawan/workload-automation,bjackman/workload-automation,setrofim/workload-automation,bjackman/workload-automation,ARM-software/workload-automation,Sticklyman1936/workload-automation,chase-qi/workload-automation