Fix initialization order in stream helper code where FILE* assignments
were overwritten with defaults.