fix: Avoid tilde expansion when substituting the HOME directory