title: Error when creating temporary directory
body: <p>I'm trying to create a temporary directory using the <code>tempfile.mkdtemp()</code> method but I'm getting the following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "src/main.py", line 29, in &lt;module&gt;
      tmp = tempfile.mkdtemp()
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/V
  ersions/2.7/lib/python2.7/tempfile.py", line 331, in mkdtemp
      dir = gettempdir()
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/V
  ersions/2.7/lib/python2.7/tempfile.py", line 275, in gettempdir
      tempdir = _get_default_tempdir()
    File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/V
  ersions/2.7/lib/python2.7/tempfile.py", line 200, in _get_default_tem
  pdir
      with _io.open(fd, 'wb', closefd=False) as fp:
  AttributeError: 'module' object has no attribute 'open'
  </code></pre>
  
  <p>when running this code with Python 2.7.6 and 2.7.11</p>
  
  <pre><code>import errno
  import shutil
  import tempfile
  
  tmp = tempfile.mkdtemp()
  try:
      shutil.rmtree(tmp)
  except OSError as e:
      if e.errno == errno.ENOENT:
          print "No such file or directory"
  </code></pre>
  
  <p>What am I doing wrong?</p>