Added median function to stats.py

It computes the median.

IT's also totally sweet.