Prevent redundant file locking

FileChannel.read(...) and FileChannel.position(...) each lock the file;
by calling read(...) with an extra argument we now have at most one lock
per call instead of two locks.