Redirect stdio when running commands (fix #32)