libxbps: optimize rootdir access/creation by checking/creating it only once.