Oops, I missed that. It certainly brings more complexity to the problem...
Database would definitely be the way to go then, I'd think. Even though I lock the files when they are read and written in my example above, two concurrent users could overwrite each other's changes.