Fix check_output not existed in py2.6