fixed #324: GIF header changes to fix Twitter problem, saving directly to hard disk instead memory