scannerlexer: Fix bad unref

It's possible for scanner->current_file to be NULL, so add a check...