'writeFileAtomic': use default permissions.

Fixes #2078.