BZ1058316 - Broken renaming when there is a dot in the file name
(cherry picked from commit dc5e6370a5de7849383bce27311dee01096f7fbf)