Handle commits for submodules in a tree, fix #2

Previously, only 'blob' and 'tree' objects were handled in a tree.
When a git repository contains submodules, they are stored in the tree
as a 'commit object' (mode 16000). While checking out the tree, an
empty directory is created for each such commit.