More robust Python install script