scripts: improve threading of bug script

git-svn-id: http://pentoo.googlecode.com/svn@6182 04556701-5d27-2e10-b29c-201e0903c0fa