Wrote median absolute deviation function.

Borrowed from: http://stackoverflow.com/questions/3415922/convert-a-r-code-into-python-script/3416784#3416784

Tested it out on a simple input.