Fixed testing of presence of R packages