Use openssl's base64 feature instead of the base64 command.

Refresh the URL for version 21 of the draft.
Document -r and -s args. Add a \n for quiet output.
Support certificates with .pem extension
Code deduplication
Merge pull request #2 from simondeziel/refresh

Nice one, many thanks.