modify certdata2pem.rb, assume encoding of certdata.txt is utf-8