Fixing ownership when atomic_move is creating a file while sudo'ing

Fixes #6647