Fix pkg which returns bogus non-zero exit status on success

Reported by:	mandree
Fixed:	#657