make sys.path mangling more generic