Bug 730396: GIMP crashes loading a XCF it saved

add few validity checks loading a xcf file.