Standardize path for list directory api call. #3487