Fix '~' in path substitution in BackendMgr