Fix line parsing in requirements check

The requirements check script would strip one character from the end
of every line without a #, which was a problem if the last line
of the file had neither a # or a newline.

Change-Id: I89f1114695adc4de6ef95a96cffcf919c88a2ac8
Merge "Fix line parsing in requirements check"