Script to average .dat files/results