Edited for the new layout of the pki directory in version 0.11+