Use the HOME environement variable instead of tilde.