Replicate what distutils/command/install.py does to get platlib/purelib