fix run_thrift what to guarantee output directory.