Fix a bug that causes infinite loop.

When the single quote is a first character in the argument (that also
contains white spaces), the Join method goes into infinite loop because
word variable is not being updated.

Added a unit test that is failing (never ends) without the fix.
2 files changed