s3: in sys_popen(), validate input before opening the pipe.