Add package validation function.
Fix local packages installation.
Make sure there is always a space after debit
Optimize some border cases for solver.
Validate pkg when changing its uid.