R-CMD check including tests. Fix existing test failures introduced after the tests were originally added (#92 and #98).