title: Region: IOError: [Errno 22] invalid mode ('w') or filename
body: <p>I'm not sure why, but for some reason, whenever I have "region" in the file name of the output file, it gives me this error:</p>
  
  <p><strong>IOError: [Errno 22] invalid mode ('w') or filename: 'path\regionlog.txt'</strong></p>
  
  <p>It does this for <strong>"region.txt"</strong>, <strong>"logregion.txt"</strong>, etc.</p>
  
  <pre><code>class writeTo:
      def __init__(self, stdout, name):
         self.stdout = stdout
         self.log = file(name, 'w') #here is where it says the error occurs
  
  output = os.path.abspath('path\regionlog.txt')
  writer = writeTo(sys.stdout, output) #and here too
  </code></pre>
  
  <p>Why is this? I really would like to name my file "regionlog.txt" but it keeps coming up with that error. Is there a way around it?</p>