Added ability to pass functions to options when using as Node.js library.
Updated docs, added info about Grunt plugin and Node.js usage.