The problem is that if we use `realpath`, when the given path doesn't exist we cannot calculate the relative key.