Fix nondeterministic test failures on Python 3.3

See http://docs.python.org/3/library/importlib#importlib.invalidate_caches:

  "This function should be called if any modules are created/installed
  while your program is running to guarantee all finders will notice the
  new module’s existence."