FormattingFix: Fix bug with formatting commit text

FormatCommitText ended up adding an unncessary space to the end of each line.
Refactored to add spaces between words before words as needed.

Testing Done: Manual testing.
Bug Number: none
Reviewed by: trivial