 		fs.symlinkSync srcpath, dstpath
 
 linkBindingGyp = ->
-	if !fs.existsSync __dirname + '/support/binding.gyp'
-		createLink __dirname + '/support/binding.gyp.original', __dirname + '/support/binding.gyp'
+	if !fs.existsSync supportDir + '/binding.gyp'
+		createLink supportDir + '/binding.gyp.original', supportDir + '/binding.gyp'
 
 unlinkBindingGyp = ->
-	if fs.existsSync __dirname + '/support/binding.gyp'
-		fs.unlinkSync __dirname + '/support/binding.gyp'
+	if fs.existsSync supportDir + '/binding.gyp'
+		fs.unlinkSync supportDir + '/binding.gyp'
 
 rmBuildFiles = ->
 	# Even though there are more build files than config.gypi we just delete
 	# config.gypi as that is sufficient for testing purposes
-	if fs.existsSync __dirname + '/support/build/config.gypi'
-		fs.unlinkSync __dirname + '/support/build/config.gypi'
+	if fs.existsSync supportDir + '/build/config.gypi'
+		fs.unlinkSync supportDir + '/build/config.gypi'
 
 describe 'grunt-node-gyp', ->
 	# Set timeout to 120 seconds as compiling may take a long time.

			execGruntTask 'archX64', (err) ->
				return done(err) if err

				configGypi = fs.readFileSync __dirname + '/support/build/config.gypi', 'utf8'
				if configGypi.indexOf('"target_arch": "x64"') < 0
					return done(new Error 'expected config.gypi to be configured for 64-bit build')


			execGruntTask 'defaultDebug', (err) ->
				return done(err) if err

				if !fs.existsSync supportDir + '/build/Debug/hello_world.node'
					return done(new Error 'expected Debug/hello_world.node to exist')

				done()
