Update calcdeps to support import as a module.

Allow importing calcdeps as a Node module for use by other scripts.  The module
API follows that of the command line exactly.

Progress on #7.
Since they would need to parsed, I think that logic is better done within the main function instead of outside it.