I think all the problems are caused by the fact that shell has "/" characters in it. If these were replaced with, say, "_" before being passed to make-temp-name and expand-file-name, I suspect everything would then work OK.
I think all the problems are caused by the fact that shell has "/" characters in it. If these were replaced with, say, "_" before being passed to make-temp-name and expand-file-name, I suspect everything would then work OK.