Implement git statistics on git trees (directories)

The current statistics refer to the complete git repository.  With this
commit it is possible to generate statistics on a given tree.