Make sure infrastructure files get excluded from coverage testing

...and ported over fix to edit-on-github feature from astropy affiliated package template.