This allows installing in other locations besides /usr.
The first path to be searched is the directory of the binary, then /usr/share/gitstats/. This is so that you can have both a "global" gitstats version and a user-specific checkout installed, and the static files should be taken from the matching place. This change is done in preparation for Debian packaging. Vincent Fourmond <email@example.com> is planning to package gitstats for debian (RFP #440392).
This seemed to be roughly three times slower than a direct "wc -l" from working tree, but this way we are not limited to full & clean working trees, but can also handle bare repositories.