Adding file specific tests

I WOULDN'T MERGE this yet.

The tests are due a tidy up => fixing the Windows fs.unlinkSync issues so I personally wouldn't merge it yet.Secondly, the code smells of possible re-factoring (most test functions do similar things) and also I'll introduce variables for the strings I'm injecting and then testing against. However here it is to show what I've done on it.