move werkzeug methods for module finding to utils.