check if subprocess cwd exists and run all commands with shell