The AddFile()
method can't process file objects directly, it wants them converted to a path string, like so:
var outFile = fsu.GetTempFile();
cmd.AddFile(String(outFile));
That seems odd, given the fact it can handle item and path objects.
GetItem()
e.g. is fine with file objects (despite the docs stating it expects strings as argument).