Fixes an issue with the R code sandbox where the generated policy would be too long when there were thousands of R packages installed.
A number of improvements to documentation.