Remove .py ending from name when loading module

If the name contains as . then the interrupter treats the part
before the . as a module and warnings that is couldn't be loaded.