use buffer safe realpath