Does it work when I'm looking for all commits changing a directory? I.e. Do directories get added to the bloom filter or just filenames?
A blob is a file (ish, it can also be use for some other things since it's not intrinsically named), a tree is a directory.
However Git doesn't treat filesystem directories themselves as first-class e.g. you can't version an empty directory. A tree only exists in order to contain sub-items (ultimately blobs).
Finding the list of all filenames that were ever in a particular path is very expensive.