Generate report even output path has unexisted dirs

Bonjour Mazerte,

I need to create cpd report in a `output` path which contains some unexisted dirs, for example: `../reports/jscpd_report/cpd.xml`, here `../reports/jscpd_report/` is not existed before running grunt task.
Saddly `jscpd` fails when the `output` path contains unexisted dir.
So I fix it using `grunt.file.*` apis.
And I add mocha test this time :)

I hope my commit will help others with the same demand.

Sincèrement,
Antoine Duan