Update Image.cc

fix fopen mode for non-POSIX platform