Better PEM File Handling