Added new PEM encoding and decoding functions. Also
added two corresponding tests.