Converted gitmerge to Python script

Makes this more easily compatible with Windows.
crbuild: Using target_os for platform instead of sometimes system()

Also, using "win" instead of "windows" because gyp uses "win"
crbuild: Fixed print to stderr
crbuild: Using os.pathsep when setting PATH env var