Ok, I've reimplemented removeMaxRotatedLogs to sort the logfiles and then remove the oldest ones.