Fix shortest absolute paths from cwd to classmap path

This fixes #1742, which occurs when the shortest path from `getcwd()` to a Classmap path is an absolute path. For example, when the working-dir is `/home/foobar` and the vendor-dir in `/usr/local/share` or something.