Solaris build script fixes

Made them use ruby/rake APIs rather than using ```sh``` for everything.
Yes, I think that should be sufficient. I'll make the change. Thanks.