Add functionality & tests.

This is cloned from the ranker from Student Robotics 2012:
* http://srobo.org/cgit/comp/compdis.git/tree/bin/scores.py
* http://srobo.org/cgit/comp/compdis.git/tree/test/test-scores.py
with some minor modifications.