wait_for module: check e.errno instead of os.errno. Fixes #8548

Updates to the `wait_for` module from 6efc8008daa8bb70ccbf51df0ff14f81843fc59e are errantly performing `os.errno == 2` instead of `e.errno == 2`.

This is causing `wait_for` to immediately fail on missing files.