fix reading/writing of real resource files on the mac