Corrected makeuniquefilename for localc function; added (copied) extension function from package raster