A temporary fix for faster module loading

*All* directories and *all* types were being checked, whereas always only the
first was being used.  This quick fix short-circuits search as soon as the
first candidate is found.
Merge pull request #145 from lizmat/fastermoduleload

A temporary fix for faster module loading