I might be missing a step, but the way I'm currently launching the command whenever I execute the AMC script with --action test the exec command is still executed, which leads to a bunch of errors since the file doesn't actually exist.
Yes, because you'd make testing of --def exec expressions impossible. Note that --def exec can be used for absolutely any kind of command-line call, which may be just printing extra information via echo, writing extra logs about processed files somewhere, making web requests to some API via curl, etc.