Fix race condition on Windows by locking measurement file writes

For https://github.com/scoverage/scalac-scoverage-plugin/issues/19