Update writemoment.py

Replaced pyfits with astropy