Replace a sleep with a wait in test_sms

This addresses issue #106