Added permissions check to the queue manager script.