   fixturePath: (fileName) ->
     "#{__dirname}/fixtures/#{fileName}"
 
+  createTemp: ->
+    try
+      fs.mkdirSync "#{__dirname}/../tmp/",0755
+    catch ignore
+      console.log "Failed to create tmp folder #{ignore}"
+
   tmpPath: (fileName) ->
     "#{__dirname}/../tmp/#{fileName}"
 
   cleanTmpFiles: (fileNames) ->
+    @createTemp()
+    
     for file in fileNames
       try
         fs.unlinkSync @tmpPath(file)

  notFoundPath: "/badone.tbz"
    
  setup: (cb) ->
    @nocked = nock(@requestUrl) 
                .get(@goodPath)
                .replyWithFile(200,"#{__dirname}/fixtures/success.txt")

main = require '../lib/index'
nock = require 'nock'
fs = require "fs"

module.exports = 
  hook: null
