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