The "pd-msg" help manual describes has to save a pd file by sending a "menusave" message like this:
[menusave( | [send pd-mypatch.pd]
But it does not explain how to save a patch to a new location. (It suggests a "saveto" message, but for me this just crashes PD.)
By running PD with the debugging flag, I've worked out that you can save a new file by sending a message like this:
[savetofile newpatch.pd home/my/directory( | [send pd-mypatch.pd]
I hope this is useful!