[ticket/12789] The directories are not deleted when the cache is purged (with memory acm)

https://tracker.phpbb.com/browse/PHPBB3-12789

PHPBB3-12789