Add a delay on exit due a bug in thread handing

An exception occurs on python 2.6/2.7 on exit otherwise...