Note that in Firefox 3.5, cookies.sqlite is locked exclusively by Firefox, so you have to make a copy of it before reading.
Also, cookies.sqlite may not be flushed to disk until Firefox exits, so you can't assume that the file on disk contains the cookies you need if Firefox is still running.