BufferedRandomAccessFile bugfixed + some JUnit test cases