Fixed incompatibility issues with Mercurial

Mecurial's module "demandimport" delays imports form like "import a, b.c", cause Pyflakes was unable to distinguish Python 2 or 3. This patch changes the imports to immediate form "__import__('a')" to avoid this mechanism.