Fix NameError in scan.py and wrong return type in probe.py
scan.py: `logger` was used instead of `self.logger`, causing a NameError
when an unrecognized language code is encountered in a filename.
probe.py: `probe()` returned `{}` on error paths but callers iterate the
return value as a list. Changed both early-return paths to `[]`.
Also replaces deprecated `logger.warn()` with `logger.warning()`.