gitstats: Refactored stats.py to use a main function