Writing private PEM to file