Using FileUtils API rather than sh for chmod-ing
Using Ruby chdir instead of executing everything as sh
Changing file permission from 777 to 755
Updating log statement to reflect the correct chmod values
Merge pull request #634 from sachinsudheendra/solaris-fixex

Solaris build script fixes