Change: Backport smartos pkgin regex fix

Ref: https://dev.cfengine.com/issues/6353
Merge pull request #306 from nickanderson/redmine/6353_3.6.x

Change: Backport smartos pkgin regex fix