I think this one is just ok.
I don't find any related function to parse this format in `path` and `path/filepath` library.
And here is some test on my Mac:
```
yichengq@1 ~> cd ~/~
cd:cd:13: no such file or directory: /Users/yichengq/~
yichengq@1 ~> cd ~/../../~/.ssh/authorized_keys
cd:cd:13: no such file or directory: /Users/yichengq/../../~/.ssh/authorized_keys
```