Added testing for the Log functionality

Used sinon to create test spies that watch mainly the logWriter to
see if the various logging functions were called on them. Also tests
the logging when environment settings are different.