PM-718: made pegasus-transfer more picky about what and when to do shell variable substitutions