Try using realpath.