Allow wait_for to wait on non-traditional files

Use os.path.exists to check for file existence, instead of "can we open
this file for reading".

Fixes #6710