Fix regression with python 2.7
Update tests to use utils.check_output rather than subprocess