[tz] [PROPOSED 3/3] Port better to non-PATH_MAX platforms