Fix rake task to run scripts via system so it is not exiting the shell which it was doing with exec() and also clean the look of it up some and break it out a little more incase you just need certain parts.