Escape tilde char in substitution for newer shells.
Use single truncation symbol, more chars for pwd.