Guard against a running replication

By locking we can prevent that an already running replication is
overwritten.
Merge pull request #1 from soundcloud/lock-guard

Guard against a running replication