adding failing test for RAF behavior
fixing mode for RandomAccessFile

also fixes the associated test