Add $PREFIX to pkg command. Minor simplifications.
Add is pkg used check.
Minor improvements. Resolve merge conflict
Merge branch 'periodic' of https://github.com/aklv/pkgng into periodic

Conflicts:
	scripts/periodic/400.status-pkg
	scripts/periodic/460.chkpkgsum