Fixed a bug in generateAssetName

Fixed **generateAssetName** method to handle paths correctly when one of the parent directories' name equals to the name of the asset.

For example, for **some_dir/normalize.css/normalize.css**, the generated name was **some_dir//normalize** which is obviously incorrect.