Hi there,
I have seen a script like that for webhosting resellers (no longer distributed). The trick that it used was to access WebHostingManager's log and get the bandwidth/disc usages per domain with PHP and report it to you via email (you can set a cron job for that). That way, whatever WHM keeps track of can be referred to.
If you have a bandwitdh stats log on HTTP, FTP, POP..., then you can perhaps access those in a similar way and group them by directories.
...well, it's not much different from what you mentioned, but if you need to do this, you need to use some kind of method to keep track of bandwitdh usage, I suppose.