Reinventing the wheel, there is not check_output for python 2.6