Improving the replication setup.

The replication scripts needed some work. Most of the changes are minor things
like quoting password values. Some logic had to be moved around to make sure
directories exist before we attempt to write to them.

Also switching to the new berkshelf format.