moved tests to tests/testthat to comply with CRAN policies, added a Rscript for command line use