rename image.save() --> image.save_render() because it uses render settings for saving.
added image.save() which is like pressing save in the image view, saving to the images path and removing the dirty flag.
Running scripts directly didnt call the register function, even though this is not essential its good to be able to run a script directly and see changes in the UI.