Walks source_dir respecting .gitignore rules and writes a .tar.gz
archive to output, prefixing every entry with prefix.
.git and the output file itself are always excluded. Additionally, entries
whose path contains a component matched by ignore_set are skipped.