MD5: handle no newline at end of nandroid.md5

If there is no newline at the end of nandroid.md5, then fgets will not
have '\n' as the last character for the last line. Make sure we aren't
replacing the last legitimate character of a string when reading the
file.

Change-Id: I3664582d7b13a2171bf074a236b44db104bb975a
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0