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.