Fix to badly-formed tree bug.

Bug here: https://github.com/blackrim/treePL/issues/3

This fix:

1) removes rightwise whitespace
2) checks if the last character in the trimmed string is a semicolon.