udevtrigger: use a helper function for subdir scanning