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.
Merge pull request #167 from cjh1/fix-module-loading

Remove .py ending from name when loading module to prevent load_source from thinking the ".py" filename is a full module path.