Adds Kernel.capture_stdout(&block) for capturing stdout output, useful for testing command-line tools.