Enable silent mode in file context in init_context

Most context initialization is done in init_context, but not the
automatic switch to silent mode when working with files. Move it to
init_context.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Extract processing to run_context

Processing the input is done in main. Extract it into a separate
function called run_context to simplify main.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>