For portability, add the `b` flag on php://temp.

From my own experience (with [`Hoa\File`](http://central.hoa-project.net/Resource/Library/File) for example), or from the [PHP documentation](http://php.net/fopen):
>  **Note**:
>
> For portability, it is strongly recommended that you always use the '`b`' flag when opening files with `fopen()`.

I strongly recommend to use the `b` flag, especially with Windows and specific encoding.