Only use cwd in run_command kwargs if the directory exists