catch NameError because of Windows
add more namespaced modules for windows
Remove unused imports
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
Ignore unused import.
Merge pull request #10420 from s0undt3ch/2014.1

2014.1 Cherry-picks