Update to work properly inside another eventmachine process

wait_for_emails was returning immediately when run inside of cucumber
testing a rails app