added check for starting $HOME for remote_tmp so as to non root sudo override

should fix #2321