fixing packaged install

Some fixes to make the packaged instal functional. 
All existing source based install logic should still function as before.