Make potentially long-running tasks print output in real-time

Tasks that might run for a longer time should present their output in
real-time if being executed interactively. Otherwise the user might think
the application is stuck.

Signed-off-by: Jan Blunck <jblunck@infradead.org>