Fixed bug 78:  flush-caches causes permission error if run by root