Fix namespace issues for imagick, and also actually save a file if the png is created with imagick (previously it would never be saved).