install-nix-from-closure improvements

Just wasted a couple hours chasing shadows because the nix store got corrupted and there was no indication of that anywhere.

Since an install is one-time only, might as well verify and optimize.
The optimization also showed that the copied files aren't read-only; fixed that as well.

@lethalman Not Bourne shell and probably some other small/embedded derivatives: http://heirloom.sourceforge.net/sh/sh.1.html