Fix fopen modes.