Support passing an options object or encoding.

As of node v0.10.0, `readFile`/`writeFile`/etc take either the encoding
string as v0.8.0 did or an object with an encoding key. This updates
the API to allow either argument, as v0.10.0 does.