Added scripts to rsync.template and action_replicate.

Fixes #645