LPS-40917

This fixes one half of the problem. The other half that I hacked I removed so Alex/Sergio can hopefully provide a proper fix to the problem of deleting files from staged to published sites.