Fixed handling of "libs" on Windows.
Added support for local package definitions in package dependencies and fixed recursive dependencies.
Improved error message.