       for pkg, filenames of @assets.js
         for filename in filenames
           if req.url.replace(/^\/assets\/|.(?!.*\.).*/g, '') is filename.replace(/.(?!.*\.).*/, '')
-            contents = fs.readFileSync(path.resolve process.cwd() + '/' + filename).toString()
+            contents = fs.readFileSync(path.resolve @currentDir + '/' + filename).toString()
             contents = preprocess contents, filename
             res.end contents
             return

  expandAssetGlobs()

  unless @usingMiddleware
    fs.writeFileSync (process.cwd() + @_outputDir + '/' + pkg + '.jst.js'), generateJSTs pkg
    fs.writeFileSync (process.cwd() + @_outputDir + '/nap-templates-prefix.js'), @_tmplPrefix

  """
  <script src='#{@_assetsDir}/nap-templates-prefix.js' type='text/javascript'></script>

# @param {Object} options An obj of configuration options
# @return {Function} Returns itself for chainability

@currentDir = path.join(__dirname, '..', '..', '..')

module.exports = (options = {}) =>

  # Expand asset globs
