run: write to temporary file then move it

sudo sudoing sudoers stuff.