(PDB-3026) Changed import certname extract to a regex
(PDB-3026) Changed import certname extract to a regex

Previously the code would use a somewhat complicated set of substring
operations to extract the certname from the import file path. This
commit switches that logic to a regex, which can also be used to detect
the kind of command at a path. This was detected previously with a
separate regex.

rbrw/puppetdb,mullr/puppetdb,waynr/puppetdb,puppetlabs/puppetdb,rbrw/puppetdb,puppetlabs/puppetdb,puppetlabs/puppetdb,senior/puppetdb,mullr/puppetdb,puppetlabs/puppetdb,mullr/puppetdb,waynr/puppetdb,rbrw/puppetdb,rbrw/puppetdb,senior/puppetdb,mullr/puppetdb,senior/puppetdb,mullr/puppetdb,waynr/puppetdb,puppetlabs/puppetdb,senior/puppetdb,waynr/puppetdb,rbrw/puppetdb