Minor modification to remove_duplicates.py