Change the paths to use the environment variable instead of basedir

The main reason for this is that we may not be an ISS script.