   ns.replace /.mustache$/, ''
 
 writeFile = (filename, contents) ->
-  file = process.cwd() + '/build/' + filename
-  dir = path.dirname file
+  dir = path.dirname filename
   mkdirp.sync dir, '0755' unless path.existsSync dir
-  fs.writeFileSync file, contents ? ''
+  fs.writeFileSync filename, contents ? ''
 
 hoganPrefix = () ->
   '<script>' + uglify(hoganTemplate)  + '</script>\n'

      source = @transform files, type
      hash = Kelvin.hashContents source
      filename = ''
      if @cdn
        filename += '//' + @cdn
      filename += '/assets/' + type + '/' + Kelvin.formatFilename name, hash, type
      output += Kelvin.formatTag(filename, type) + '\n'
    else
      if type == 'jst'
        output += hoganPrefix()
      for file in files
        source = fs.readFileSync(@contentsDir + file, 'utf8')
        hash = Kelvin.hashContents source
        filename = Kelvin.formatFilename file, hash, type
        output += Kelvin.formatTag(filename, type) + '\n'

    else if type is 'css'
      source = sqwish.minify(arr.join(''))
    source

Kelvin.hashContents = (source) ->
  md5 = crypto.createHash('md5')
