Small tweaks to rank.py, added extract.py

Extract.py will find the summary of the best result document in the
output from rank.py.

To this end rank.py now includes both the model file names and the
collection model file name in output.