Preserve file permissions when creating a tar.

This is the default behavior of the `tar` command.
Rewrite test to get expected filemodes with `stat`

Apparently `git` only recognizes three file modes: normal, executable,
and symlink. The actual FS mode of executable files depends on the OS and on
the way `git` is configured. So, the expected modes cannot be hard-coded.
Make filemode preservation optional, default false
Merge pull request #1 from christierney/preserve-permissions

Preserve permissions