Make finding and installing dune.module work on both Debian and RHEL simultaneously

This is a follow-up to #350, where the behaviour was changed to work properly on Debian. Unfortunately, this caused the code to break again on RHEL. This changeset hopefully satisfy both cases.