Give the ruby interpreter something to do.

 - Ruby was waiting for stdin, it expects to run a program
 - Also clean up some things and make the code a bit more generic
 - And remove the c-style cast, what was that about?

@axelstudios @macumber @kbenne
Merge branch 'develop' of https://github.com/NREL/OpenStudio into develop