File truncate not work for already opened files

```php
$file = new File('example.txt');

$file->truncate();   // -> fopen('example.txt', 'wb') will truncate the file
$file->write('foo'); // -> fputs($handle, 'foo')

$file->truncate();   // -> fputs($handle, '') => will not truncated because handle is already opened!
$file->write('bar'); // -> fputs($handle, 'bar')
```

The file `example.txt` will contain `foobar` and **not** `bar` as expected.