Compare values instead of pointers in Inventory::operator==

This fix to Inventory::operator== makes it so only modified player files are written on each cycle, as is the intention of the checkModified call near environment.cpp:429.