Allow end of line comments in inventory file

fixes #2702