new function to resolve the full path of symlinks