   # permission to the path.
   writeFileWithPrivilegeEscalationSync: (filePath, text) ->
     try
-      content = iconv.encode text, @getEncoding()
-      fs.writeFileSync(filePath, content, encoding: null)
+      contents = iconv.encode text, @getEncoding()
+      fs.writeFileSync filePath, contents
     catch error
       if error.code is 'EACCES' and process.platform is 'darwin'
         runas ?= require 'runas'

    if not @exists()
      @cachedContents = null
    else if not @cachedContents? or flushCache
      content = fs.readFileSync @getPath()
      @cachedContents = iconv.decode content, @getEncoding()

    @setDigest(@cachedContents)
    @cachedContents

  # Sets the path for the file.
  setPath: (@path) ->
    @realPath = null

  # Public: Sets the file encoding name.
  setEncoding: (@encoding) ->

