Ported over changes to Sphinx from astropy core package
Merge pull request #6 from astrofrog/updated-sphinx

Ported over changes to Sphinx from astropy core package