Added a safer way to redirect git output