Fix tree tests

* tests/tree.R: Use writeChar instead of writeLines to have more
  control over line endings.

Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>