Add tests for RData reading and writing