Previously, all initrd ELFs would be made *world-writable*. This commit sets the write bit for the file owner exclusively, and removes it when done. It also sets the umask so that files don't implicitly become writable for other users by mistake. Fixes: https://github.com/NixOS/nixpkgs/security/advisories/GHSA-m7pq-h9p4-8rr4 Reported-By: sudoBash418 <sudobash418@gmail.com>