Elegant solution, Cheesemill!!!
To explain for the benefit of others who may come across this thread later, here's why it works: If the device is actually mounted to the mount point, the empty file "mounted" is hidden from the system and the "if" test will report that the file doesn't exist. However, if the device is not mounted, then the file will show up to the test action. It's not at all obvious at first glance, and unless you understand that mounting the device hides the original content of the directory looks like nonsense.
I wish I had thought of it!
EDIT: Actually the directory I was suggesting to test for was located only on the external drive, not in the mount point itself, as suggested much earlier in the thread. However your solution is much cleaner...
Bookmarks