Currently we call the remove_excess_backups() method for each individual course. Each of them will call scandir() on the whole directory, we should think of a way to improve this.
Possible solutions are:
- Cache the directory content, but we have to be very careful not to use outdated information;
- Update the method remove_excess_backups() so that it scans the directory only once and handle the excess backup for each courses found at once;