Allows Cygwin use

Changed os.system() to refer to the local bash.exe. Also, added a function definition to remove ^M character.