Ok, here's an amended version of the script which tries to check for symlinked directories (by parsing the output of ls -l .. yuck!) ... recursively and with caching. May well be full of holes.. feedback welcome
if -l $file