Fix task for Darwin OS

OS X identifies itself as **darwin**, which means the condition `/win/.test(process.platform)` passes for OS X. This patch fixes this behaviour.