configure: Add base check for modules parameter to prevent impossible build attempts due to invalid values
We didn't validate modules parameter values which allowed build failures if a module was removed
(or the user just passed an invalid value).
Now we will do a base check by checking for the existence of the module's source dir.
This will allow us to catch errors like that and show a meaningful error message if
necessary.
Same implementation like for dynmodules parameter (introduced with
commit
09acf5464f18268f898e6a4b5a96af53ed9f523d).