Get rid of the sole strtok call in the tree.

It might have (not here, though) side effects, since it isn't reentrant.
Instead, replace it with strspn.