Don't double replace ~/, and do replacement of configuration values