TrimTrailingWhitespace fails for "whitespace-only" lines

If a file contains *whitespace-only* lines, the whitespace is ***not*** removed when **trim_trailing_spaces** is set to true.

After looking at the code it's not immediately obvious why that would be the case. It all look reasonable. I've added a comment to 2 lines where the issue may lie.

I'm hoping this is a simple fix. However, just let me know if you want me to look into it.

Thanks

PS This would probably be better as an Issue than a pull request?