Could not open files in .idlerc directory if latter was hidden on Windows.
Issue 1743, Issue 1862.
Backport r60225, r60745
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 826fb5d..3ddb4ed 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -142,7 +142,12 @@
 
         """
         if not self.IsEmpty():
-            cfgFile=open(self.file,'w')
+            fname = self.file
+            try:
+                cfgFile = open(fname, 'w')
+            except IOError:
+                os.unlink(fname)
+                cfgFile = open(fname, 'w')
             self.write(cfgFile)
         else:
             self.RemoveFile()