docs: function _calcExtension(filename, currentExt) {
  	// simply return the rightmost extension
  	var ext = filename.split('.').slice(-1);
  	if (ext=='tem' || ext=='html')
  		// revert to html if no better option.
  		// The html check is here to rename 'tem.html' to '.hubla' if 'hubla' has been set as the new default extension
  		return _config.DEF_EXTENSION;
  	return ext;
  }