Fixed version of suffix Tree construction

Signed-off-by: Krzysztof Opasiak <ups100@tlen.pl>