Fix for the sys.modules[None] issue with pytest

Fixes #55