fix handling of multiple module paths

Replace every occurrence of $confdir, not only the first one