Preserve permissions

Early merge of existing upstream pull request.
Might go and fix the last issue that they have in the comments that it keeping it from being pulled, but it's a "what if" that doesn't apply to our tgz use case