add a map option, which may be used to manipulate header information

I need this for npmd-install

npm tarballs have everything inside a `package/` directory, i.e. `package/package.json`
when unpacking I want to change modify this as I extract. this patch adds a map function which allows you to manipulate any header value.

For consistency, I've also added this for `pack`.