Fix #868 with subprocess check_output_wrapper