Fix path info when using realpath