Use secure permissions in zip and tar files.

Previously, we used 666 and 777, and expected the user's umask to take
care of adjusting the permissions. Unfortunately, info-zip overrides
the umask, writing world-writable files to disk.

Thanks to Spiky Caterpillar for the bug and the fix.