Fix when @extension is empty

To have same name in output, i need to set @extension to empty and remove extra dot into output file