I don't think that will work with extensions. The application should also support opening directories (in addition to files) from the command line.
If the application supports it, you can try to define a service menu for Konqueror, so you get an item in the Actions submenu when you right click a directory.