[BUGFIX] PackageManager fails on empty and non-extension dirs