Extended RunDoctestsScript.

Implemented print_to_terminal=True keyword on RunDoctestsScript.process_args().

Set print_to_terminal=True to preserve default behavior (and print to
terminal).

Set print_to_terminal=False to return a list of output strings.

The keyword name is the same as IOManager.profile_expr(print_to_terminal=True).