The problem was that the path was being created in the script by using the user name variable:
userName = emc_vars["userName"]
output_dir = os.path.join("/usr/local/Extreme_Networks/NetSight/appdata/logs/scripting/",userName)
The user that runs the scheduled jobs is "NetSight Server" with a space!
The associated directory is NetSight_Server with an underscore.
I've hard coded the path for now to get around the problem.