Make tests cleaner redirecting stdout and stderr