Replace lists with dicts in inverted file, fixes #10