Allow callers to set mode on packfile creation
Merge pull request #1952 from ethomson/packfile_mode

Allow callers to set mode on packfile creation