gitstats: Expanded setupRepo and refactored 'addFile' into it's own function