Add semid accessor and better permissions test