Changed pyfits to astropy.io.fits.

Implementation for #18.