Return the remote calls exit code if possible
Return the remote calls exit code if possible

Fallback to exit(1) if we can't get it for some reason.

This should fix jenkins build deploys from saying they succeeded
but they actually did not.

jwilder/galaxy,litl/galaxy,zombor/galaxy,joeshaw/galaxy