fix ZeroDivisionError in averages
fix empty directories being created up the wazoo