catch NameError because of Windows
add more namespaced modules for windows
add missing imports
use two spaces before inline comment

Keep pylint happy
properly namespace win_file.remove

fixes #10233
namespace win_file.append

fixes #10233
Merge pull request #10416 from UtahDave/fix_win_filemanaged

Fix win filemanaged  fixes #10362