move tests to tests/testthat as recommended by Hadley in the latest version of testthat and use make_check in test file