Started code to write packfiles.

It seems that writing a packfile with a single blob works: `buh pack` will
create a /tmp/t.pack file, and using `git unpack-objects < /tmp/t.pack` (in a
new Git repository) indeed recreates the correct loose object.