Development mode install from clean source fails on first attempt

When I try to do a development install of astropy (or an affiliated package) from a freshly-cloned version, it fails with `AttributeError: 'NoneType' object has no attribute 'mkdtemp'`.  But, immediately running the install command again after the error works.

```
>>> git clone https://github.com/astropy/astropy.git
>>> ./setup.py develop
Initializing astropy_helpers submodule with: `git submodule update --init -- astropy_helpers`
Freezing version number to astropy/version.py
running develop
running egg_info
creating astropy.egg-info
writing requirements to astropy.egg-info/requires.txt
writing astropy.egg-info/PKG-INFO
writing top-level names to astropy.egg-info/top_level.txt
writing dependency_links to astropy.egg-info/dependency_links.txt
writing entry points to astropy.egg-info/entry_points.txt
writing manifest file 'astropy.egg-info/SOURCES.txt'
Traceback (most recent call last):
  File "./setup.py", line 112, in <module>
    **package_info
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 32, in run
    self.install_for_development()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 113, in install_for_development
    self.run_command('egg_info')
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 168, in run
    self.find_sources()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 193, in find_sources
    mm.run()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 277, in run
    self.add_defaults()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 309, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/sdist.py", line 19, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/sdist.py", line 67, in _default_revctrl
    for item in finder(dirname):
  File "/usr/local/lib/python2.7/site-packages/setuptools/svn_utils.py", line 470, in svn_finder
    info = SvnInfo.load(dirname)
  File "/usr/local/lib/python2.7/site-packages/setuptools/svn_utils.py", line 266, in load
    with TemporaryDirectory() as tempdir:
  File "/usr/local/lib/python2.7/site-packages/setuptools/py31compat.py", line 30, in __init__
    self.name = tempfile.mkdtemp()
AttributeError: 'NoneType' object has no attribute 'mkdtemp'

>>> ./setup.py develop
(installs fine)
```