More fixes

Attempt at making the fwrite/fread/fseek functions work.