Added more checks on directory existence and permissions to the queue manager.