Added commonTextWriter that will be used by textWriter and logger.
Refactored to use commonTextWriter.
Refactored core.lua to use commonTextWriter instead of dirty logger.
Refactored asserts.lua and emend to use commonTextWriter instead of dirty logger.