Ensure working directory is correct for local command execution.