Vim will add these if you created a file on Windows, and you try to open it on a *nix machine. Apparently you can avoid this entirely with some extra configuration, but if it happens, just ente the following command:
:s/^M$//
(press CTRL+V
and CTRL+M
to enter the ^M
thingie)