phranque - 4:16 am on Nov 6, 2012 (gmt 0)
you really tied all the loose ends together there...
the performance loss for the -f and -d tests depends a lot on the web server OS and how it is tuned.
for example bsd with sufficient memory normally works well for this with its dynamically optimized disk cacheing.
the existence check is only "expensive" the first time.