COMP: Fix loading of external "loadable module" providing python script

Thanks to "Wang, Kevin" <kevin.wang@rmp.uhn.on.ca> for his help
identifying and testing the changes.

Co-authored-by: Wang, Kevin" <kevin.wang@rmp.uhn.on.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22812 3bd1e089-480b-0410-8dfb-8563597acbee