fixes #10522 - added some file.py functions to win_file.py
added imports and removed search/replace that needs an extra look
Merge pull request #10637 from goldbach/issue10522

fixes #10522 (partially)