Generate correct file offsets for Unix/Linux and Windows/DOS