Added working pistatsd.py to the master branch with some exceptions remaining