Fixed issues trying to see if upgrade is required and getting scripts to...

... execute

Fixed #29