More robust nss database handling

Also initializes RW, fallsback to NoDB Init if needed, creates
directories if possible.