Inverted index reducer

Two corrections; note that the list.sort() method returns None.