Fix port test when make fails (build,stage,check-orphans) and can't remove temporary pkgdb
Fix port test when make fails (build,stage,check-orphans) and can't remove temporary pkgdb

xmj/porttools,skreuzer/porttools,tota/porttools