Fixing file open mode in stream test