Fix sudo_user copy regression

Treat errno 13 (permission denied) as one of the special cases in
atomic_move.

This type of error can occur because of sudo'ing to non-root user.

Fixes #3705
Merge pull request #3706 from lorin/sudo_user_breakage

Fix sudo_user copy error