Fix usage of getline
Fix more gcc warnings
Fix pkg add allowing to install package with missing dependencies