I could look at the remote deployment API.
Deleting .deployed happened when copying things manually. Although every time I try to get a clear set of steps to reproduce it works the way I would hope :-) I'll fix the .DS_Store stuff first (maybe it is noise coming from there) probably just by ignoring all deployments whose name start with a '.'