Move check_output and git() to test utils

check_output and git() were only used in the tests, so move to
tests.utils.

Change-Id: Ib2c52c9977abee81dccf3ec9496a7bc2afbef02b
Merge "Move check_output and git() to test utils"