Improve the stats function. See #153
Change the generate function for file names. All special chars like "< > * / \ " | ? " are replaced with "- _" or nothing. See #154