removing duplicate extension on filename