Check the generated command for emptiness instead of member variable

The ssh/scp commands generate the command on the fly and never store it,
they would unnecessarily fail.