I wrote the patch. Unfortunately it's Nix specific because upstream
rejected it because Ubuntu Trusty's version of realpath doesn't seem to
have the `--relative-to` option. (Upstream used to use realpath before).
But for Nix, our version of realpath is recent enough. Also, upstream
will probably use realpath again anyway in May 2019 when Ubuntu Trusty
becomes unsupported, so this patch should probably be used.