Pardon me for asking stupid questions, but what's wrong with 16-bit? Even with only two layers of subdirectories, we're talking 65536 different slots to put things in, meaning an average of only about 6.1 items per slot. The number of images could increase by a couple factors of magnitude and still probably do ok with that many slots.
Just use 16-bit. The simplest solution is usually the best.