Update name script to support import as a module.

Allow importing the `name` script as a Node module for use by other scripts.
The module API follows that of the command line exactly.

Progress on #7.
Merge pull request #194 from nicksay/name-module

Update name script to support import as a module.