split some image IO functions to separate module
add image saving to util
clarify how merge_mean works