tree: calculate the filename length once We already know the size due to the `memchr()` so use that information instead of calling `strlen()` on it.