Clear cache and log directories filled by the console command, refs #1903.
Merge pull request #1910 from cmfcmf/ci-fix

Clear cache and log directories filled by the console command