added some tests to fileAppendingEventListener facilitated by proxyquire
minor tweaks to error handling