Setting the 'BUNIT' header keyword to 'Jy/pixel' after the images have been converted.
Added a function to clean up the output files generated by previous executions of the script.