refs #4610 simplified some logic, fallback to http on windows, redirect the output of php to get output even if piwik exits