Make coverage results more accurate by starting coverage collection
before importing astropy.
Fix path cleanup in coverage
Merge pull request #2112 from mdboom/testing/fix-coverage

--coverage does not measure complete coverage