Preserve file permissions when creating a tar/tar.gz.

We have some executable scripts that are losing their executable status when we compress them. This change passes along to `archive.append` whatever the uncompressed file mode is, which is the default behavior of the `tar` command.