Clear cache and log directories filled by the console command

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | #1903
| Refs tickets  | ---
| License       | MIT
| Doc PR        | ---

This *should* fix it.. We'll have to see if it worked once it's merged.