Found it!
1. Create a new extension filter in Settings > Extension Filter with the extensions that you want by clicking on the empty row under the last entry.
2. Create a rule using the reference name for that particular filter in Settings > Rule System by clicking on the empty row under the last rule. Override the naming mask for the rule by setting it to <FolderName>/*name*.*ext*
There is one issue though, the rule system doesn't seem to be working. Even after activating the rules, all files are stored in the same directory(Downloads) instead of being saved to the respective sub directories as mentioned in the naming mask