libbladeRF, bladeRF-cli: Fixed defects reported by Converity Scan

Addresses CID: 113696 - 1133700, which consist of potential NULL pointer
dereferences, dead code, and invalid memory access (clobbered a NUL
terminator).