Fix centos bats.

* generalize test helper functions for running bats

Signed-off-by: Andrea Law <alaw@pivotal.io>