These are written to import the python utility into the unittest as a
module, which is then tested. Python 3.12 removed "imp" which broke
this.
The documentation discusses using spec_from_file_location [2] for this
task, but one complication is that it only allows files with an
extension of .py to load like that ... so add an additional hack so
that the importlib loader will read the file.
[2] https://docs.python.org/3/library/importlib.html
Change-Id: I3c842b3a712ead6d2151b90171f9228caecedd11