better checking and file iterating

1) Now ensures that groups are properly ranked.
2) Uses os.listdir to iterate over submission files
comma

stupid comma!