Remove trailing spaces on auto generated backup names

Trailing spaces sometimes cause folder creation depending on what
file system is in use (e.g. vfat).
Merge "Remove trailing spaces on auto generated backup names" into android-4.3