Fix mocha test that was failing on windows

Windows uses \r\n for newlines, so the timestamp included a \n after
replacement.
Also, an extra space got in there, so the test trims the string
before comparison.