Replace tilde with HOME var