relpath.sh script produces wrong results
Summary
The mk/relpath.sh script is supposed to be a shell implementation of realpath, but produces wrong results.
Steps to reproduce
$ ./mk/relpath.sh /usr/lib/ghc/lib /usr/lib/ghc-doc
..-doc
Expected behavior
$ realpath --relative-to=/usr/lib/ghc/lib /usr/lib/ghc-doc
../../ghc-doc