coding fixes suggested in 
http://mantis.tokeek.de/view.php?id=509
http://mantis.tokeek.de/view.php?id=510
Merge origin/master
fix startup stop on missing HTCACHE/SNAPSHOT directory