build_wrapper: Refactor {SSH,SCP}_COMMAND a bit

Change-Id: Iaf23d2729b81931a3235ad17e02eb9e23c4d3c44
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>