fixbug for get part of filename when filename contains two '.'

when use [Building the files object dynamically](http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically)
like this:
```js
{
    expand: true,
    src: [PATH_SRC + APP_NAME + '/*.js', PATH_SRC + APP_NAME + '/**/*.js'],
    dest: PATH_DEST,
    ext: '.js',
    rename: function(dest, src) { console.log(src);
        var version = getVersion(src, PATH_TMP + APP_NAME + '.json', grunt);
        return version && (dest + version);
    }
}
```
If there has a js file like zepto.min.js, and the output is zepto.js.