respect preferred-install config property, when installing or updating packages

merge #87 first