Fix unsafe usage of FileChannel.read()

`read()` may return fewer bytes than requested; when this occurred, the old
code would silently return less data than requested, which might cause stream
corruption errors.
In here (and FileServerSuite), I think that the bug is that this should be `nRead >= 0`.  If `nRead` is less than the length of `file` but greater than 0, then I think this would exit the loop without having copied the whole file.