fix CloseResFile with refNum 0.