Fixes some ordering bugs in run_local and makes malformed commands less error-ey