rstrip() strips characters, not strings

Fixes bug 1155761

This use of rstrip() could end stripping off more than just the ".gz"
suffix if the filename contains any of the ".gz" characters at the end
of the string.

Change-Id: Id75388453f286ca7b05bab51c9826c43c10ef516
Merge "rstrip() strips characters, not strings"
Merge remote-tracking branch 'm_src_repo/master' into build-temp