Handle tilde in `Path.expand/1,2` properly

Closes #2579 
 - `~`:

Ruby, Zsh, Python expand it to `HOME`
 - `~/dir`:

Ruby, Zsh, Python expand it to `HOME` + `/dir`
 - `~user`:

Ruby, Zsh, Python use `getpwnam` call but behave differently.
In case of `user` existence `user`'s dir will be returned, otherwise:
- Python returns path unchanged
- Ruby, Zsh raise