Cli: Refactor agent setup config creation and file verification

refs #7423