Fix whitespace and `^M` control characters normally generated by Windows

The original files contain `^M` control characters that usually originate from editing files in Windows.
The dreaded dos line-endings. These control characters can cause errors on Linux machines.

Once these files are patched, the patch files themselves need patching to still apply to the patched theme files.

Extra whitespace at the end of lines is also removed.