Trim path name