Fix tilde expansion for redirection