Fix typo in formatPathExpression.

Commit 2d710e0c introduced this simple typo that results in:
  NameError: global name 'i' is not defined