updates to compare.py output

compare.py now writes a file that includes both IDs and names for each
of the recorded items.