Add redirection support for os.system