Hmmm, looking at your problem, are you sure you want to use the path in the primary key at all? What happens if you move a set of files? Multiple updates on primary keys can be a pain...
I'd probably go with a unique number, something that I don't need to worry about updating, and then leave the path in a separate column(s).