Modified build scripts to fix output redirection for shells like dash.