refactor imports to use read-tree merging

Separate out save_tree() and stop requiring a branch name on cache
methods. We'll add that stuff back in later, when we know more about
what we want. Add the TreePath namedtuple to make resolving imports more
structured.
handle the main build in LocalModule
save the last imports tree

LocalModule now saves the import tree is applies to the file
.peru-cache/lastimports, and passes that as the previous_tree argument
to export_tree. Finally remove the --force flag from the git-checkout
command in export_tree.
fix git-read-tree --prefix for paths containing . or ..