Update write_filtered_cube.py

Replaced pyfits with astropy