There is no complexity. If somewhere in your code you generate empty directories, then also generate a dummy file. It's true that Mercurial could track empty directories, as a directory is nothing else than a file that has a list of files, but once you know this "limitation", then you know how to easily overcome it.