GRIM/EMI: Fix segfault in Localizer constructor

This fixes a segfault occurring in the file reading for loop.