Fix 'ext' option for folders containing dot in name

### Problem

`grunt.file.expandMapping` doesn't work as expected when it encounters a folder with a dot in its name.

Current result:

    expand/dee.p/dee.p.txt -> dest/expand/dee.foo

Expected result:

    expand/dee.p/dee.p.txt -> dest/expand/dee.p/dee.p.foo

### Proposed solution

Use last occurrence of '.' to replace the extension.