Solaris build script fixes

Made them use ruby/rake APIs rather than using ```sh``` for everything.
Was (a+x) or 755 not sufficient?