Correctly handle ./setenvironment.sh invocation when creating symlinks