Implements 'writeJSON'

@SBoudrias 

I try to be considerate about the actual use case of this API (e.g. multiple places trying to update the same JSON file), so it feels more like an `editJSON`. Please let me know if you want the two things to be separated.

It also seems like a similar behavior for `write(path, contents)` function would be handy - think when you want to allow multiple yeoman generator to modify the same file (e.g. index.html). If you like, I can do another PR to enhance `write`.