Fixed issues with tools/build.sh

On my linux box, using lowercase sub-commands to R is problematic. Also, the currently built version is 1.4-6.