remove trailing space so Brian's parsing tool works
Fixes #2

Calculate buffer size correctly when lock control TLV preceeds NDEF TLV
9600 for example