Partial fix for issue #6, save output to file. Supported for OS X only.
Includes doc and unittest additions