Use Perl IO for Rserve communication (fix #13)

- replace use of `sysread`/`syswrite` with `read`/`print` for
  consistency throughout the code

- when reading, ensure all of the expected data is read, since read
  calls do not guarantee it