support for subdirectory-based multiple keys

Hi,
Just as it says on the tin. I need this feature for one of my projects. I'm happy to discuss about any edge cases I may have missed or about any feedback provided.

--
Lacides