improve method for getting home scheme purelib

fix for #899