wait for safe mode to turn off before running test

Signed-off-by: Colin Patrick McCabe <cmccabe@cloudera.com>