Add the average calculator for statistics output

Usage: ./avg.sh <tag> <file>