Fixing broken while loop in imports.py

Issue: flake8 occasionally encounters "H302  import only modules."
error even though the python module exists at the path and python
shell is able to import the same.

Root-cause: The while loop in is_module_for_sure() had a bug, where
iterating variable, 'mod_name', was getting derived from the same
input, 'mod', every time. It should have led to an infinite loop
otherwise. But, an ImportError takes it out of the loop. Most of
the cases, this is not an issue, if as part of the exception handler,
built-in __import__() finds the module. The evidence of the issue is
the availability of import statements suffixed with "# noqa" to
work-around the bug.

Fixing the while loop causes the logic to flow in the original path of
the code to use 'imp.find_module()'

Change-Id: I83d80b1cf6961568e825d4387443b285e490fb40