packbuilder: also write index in git_packbuilder_write

git_packbuilder_write() used to write a packfile to the passed file
path. Instead, ask for a destination directory and create both the
packfile and an index, as most users probably do expect.
Merge pull request #1614 from schu/packbuilder-write

packbuilder: also write index in git_packbuilder_write