Changes to make save_stack_as OMETiff work from script.