Fix parentheses finding in evaluateParentheses

Previously, the evaluateParentheses() method found
the very last closing parenthesis in the string,
not necessarily the one that matched the opening
parenthesis. Also fixed test for variableString()
method so the string tested was ordered.