Fixing if statements for Windows and OS X.
Also fixing 'git ... ||' statements.