[Sanitizer] Bump kMaxPathLength to 4096 and use it more extensively instead of hardcoded constants