Move object2file module out of git.js.

@devoncarew PTAL thanks