Add missing checks of return result of open() and gp_camera_file_get()
Coverity CID 1034362