Move certificate handling to its own directory