Handle SSH failures when creating remote tmpdir

Bail out if the SSH command fails rather than continuing with an
empty tmp variable.
More informative error message on failure to resolve tmpdir
Merge pull request #3531 from fractalcat/tmpdir-failure-handling

Handle SSH failures when creating remote tmpdir