Fixed tests executing real things
Upgrade command fully working - refs #171
Added upgrade command to the bash script - refs #171