Yes, it is doable, but you should consider installing a full fledged PACS a this point.
You could hard code a list of directories instead or using the directory argument, or receive a comma separated list of paths instead and then alter this method:
so it uses a different storageDir that matches your criteria.
You do need to change the source code and build it again.