Replaces a call to usleep with one to sleep

usleep isn’t available on OSX, so in order to make this script work
there the usleep call had to be changed.