       fs.writeFileSync(filePath, text)
     catch error
       if error.code is 'EACCES' and process.platform is 'darwin'
+        runas ?= require 'runas'
         # Use dd to read from stdin and write to filePath, same thing could be
         # done with tee but it would also copy the file to stdout.
         unless runas('/bin/dd', ["of=#{filePath}"], stdin: text, admin: true) is 0

_ = require 'underscore-plus'
{Emitter} = require 'emissary'
fs = require 'fs-plus'
Q = require 'q'
runas = require 'runas'

Directory = null
PathWatcher = require './main'

    if not @exists()
      promise = Q(null)
    else if not @cachedContents? or flushCache
      Q ?= require 'q'
      deferred = Q.defer()
      promise = deferred.promise
      content = []
