Small refactoring of FileStream

Small refactoring of ```FileStream```:
Renamed ```fread()``` and ```fwrite()``` functions which are ambiguous with standard functions.
Simplified a complicated loop in ```insert()```.
And some trivial improvements.