Properly parse command for remote execution.