Fix error when signing with Swedish BankID card

Added card type check in addition to check for SC_SEC_ENV_KEY_REF_PRESENT

Added card type check in addition to check for SC_SEC_ENV_KEY_REF_PRESENT
Merge pull request #274 from github-asmw/private-do-3

openpgp-tool: Added PRIVATE-DO-3 dump option

The bytes of private-do-3 will be written to stdout raw.
Requires pin and verify to work.

openpgp-tool: Fix private-do-3 dump for Windows

fwrite will convert line endings on Windows if the destination
is not openend in binary mode. As this actually dumps binary data,
it makes sense to reopen stdout in binary mode for the dump.

openpgp-tool: Enable dumping of all DOs

PRIVATE-DO-<X> can now be dumped via the -d/--do switches and
the DO number as a parameter.
PRIVATE-DO-[12] can be dumped without verification.
PRIVATE-DO-3 requires CHV2, PRIVATE-DO-4 CHV3.

openpgp-tool: Dump DOs as hex into a tty, binary otherwise

This prevents messing up a terminal if there really _is_
binary data in a private DO. To force the binary data to a terminal,
pipe through cat.

openpgp-tool: Hint at the pin and verify options on error

SC_ERROR_SECURITY_STATUS_NOT_SATISFIED is the error code
here when dumping a private DO without the appropriate verification.

openpgp-tool: Explictly use --raw for binary ouput

The --raw switch already exists. If present, raw binary will be written,
a pretty-printed hex/ascii representation otherwise.