Updated scripts to pass Environment

Added an environment variable to the scripts so that the parameter can
be passed in and environment specific values are specified in the xml
config. This only applies to certain scripts that require different
values for different environments e.g. urls, usernames and servers etc.