[Reviewer: Andy] Escape all fields, and do it properly.

Andy,

Please can you review my fix to escape values when doing replacements in local_settings.py.  This fixes #80.

I've live-tested.

Thanks,

Matt
I'll raise a new issue.  I don't have time to fix this as well this sprint.  Note that the existing fix was just to the characters we often see in variables.