Fixed 3rd-party package installation for namespace packages and overriding built-in libraries

Replacing sys.path.insert() with site.addsitedir() makes it possible to import namespace package dependencies.
since we are likely to always pass `1` to this function, maybe we can get rid of the `index` arg.