fix improperly-closed substitution in BASHRCD_PATH
handle escaped tilde (Bash 4.3)