Added median function to stats.py

It computes the median
Merge pull request #1 from eigenbrot/median

Added median function to stats.py