Create a missing else branch to prevent getting an Le of size 4 in case le is 65536.

Furthermore if Le has extended length than Lc have to be also extended length in case it is not 0.
Le has just 3 bytes in case Lc is absent.
Fix an error related to Lc which is to short in case the Lc in the original APDU is absent.

Also create the SecureMessaging APDU with the CardCommandAPDU and TLV class.
Fix an error in test case 2.1 where Lc have to be 0x0A instead of 0x09.