Fix psd load error on windows

On windows, ifstream::open does not guarantee to be at the beginning of
the file.