Make sure to flush stdout and stderr before exit

This is needed when the ouput of jake is a pipe as in this case,
process.output and process.stderr are non blocking.
Version 0.6.12