Do basic check to verify SD card is not broken

- Check if cmdline.txt was written to SD card successfuly
- Check if zero'ing out MBR did not report error
- Zero out first 8 KB and last 4 KB of card to get rid of GPT and partitionless FAT headers

Unrelated bug fix:
- Get rid of newline character at end of /proc/cmdline