I have done some more testing. I set up two test tasks, one with an action with a path to an executable with no spaces in the path and another with spaces in the path. The TaskScheduler library returned a proper path (that is, one without quotes) for the first task but an incorrect path (that is, one with quotes) for the second task.
Weird.
Weird.