Fix karma.conf.js updating on Windows

Karma.conf.js may contain \r's when checked out on Windows. Cope with
these when updating the karma configuration file content.
Merge pull request #641 from peitschie/win-karma

Fix karma.conf.js updating on Windows