Fix bug in format.py for sorting column

The reduced mapping file was not looking explicitly for the location of
the sorting column but rather working under the assumption that it would
be the second column.