Create avgdev.py

This does some useful statistics stuff