I've replaced all instances in the code of `os.path.abspath` with `os.path.realpath`, as this does the same as `abspath` plus resolving symlinks. See also: https://stackoverflow.com/a/40311142