Fix wrongly used CFile::Exists() for directories instead of CDirectory::Exists()

Cherrypicked from PR #5309.
Intended to fix problem with various VFS, including recently added Win32File.