I suppose that the issue with using realpath is while it's good at stripping args from chromium based browsers it'll have issues with programs run under script interpreters. Maybe the drirc needs a more advanced app path or name matching method to deal with cases like that.