Add testing in, make things promise

I've added testing to this, not sure at all this is how it should be.

@kevinhodges @philmeehan @panicnot 
Not 100% sure I agree as it's paramaters for the function, do you think this looks better?

```
fs.writeFile( self.bobDir + 'bobfile.json' ,
		JSON.stringify( configFile, null, 2 ),
		{},
		self.log( 'Ill keep an eye on this now, and I will call it ' + sitePackage.name, 'success' ) );
```