Check to see if the pki_dir exists before chdir to it
Changing list() to [] to make s0undt3ch happy. :)
Merge pull request #12621 from JustinCarmony/check-pki-dir

Check for pki_dir's master/minions before chdir into it