Move the comment on the script's purpose and compatibility with vendor
firmware versions to the top of the file. Adress style nits in other
comments (start with capital, end in punctuation).
The ihex format conversion code most probably doesn't support "\r\n*"
(any number of trailing newlines), and neither needs to. Split on LF and
trim trailing whitespace is good enough (as the code already does). Make
the comment catch up with the implementation.