I was in the same predicament a while ago, and as you explain, there's no way that a container field "knows" if the file it's linked to, exists.
That means another method is needed. I have a scripted solution.
It basically involves having a dummy container field (a global container is probably better for this). Have the script insert the "derived" path reference into it. If it fails, you can capture the error and do your thing.. Otherwise just clear the dummy container field.
See attached file.
I did try that without success but I'll download your file and give it a try when I get back to my computer.
Using the iPad to check for any responses so I can't try it at the moment.
Just tried it and it works perfectly!!
I had tried almost the same thing that didn't work. Don't know why not.
We'll see how it goes on my file.