Condor.py: flush stdin and stdout

Without flushing, the header of err and out files could be misplaced