Fix error related to the dot in pyi package names
The code for generating .pyi file assumed that the Python package name could directly be used as a directory name. This is not true for packages such as "paraview.modules", which must be converted to "paraview/modules" to be used as a directory location.