update to work like readlink -f