Update masterInstaller.sh

Added foreman_version as parameter and different fixes