Bugfixes and improvements

- Tampering functionality gave false positives, requiring refreshes
  when there actually was no tampering...
- Command line teardown had multiple bugs.
- Logging to memory was not thread safe, resulting in weird (null) logs.
- Better logging for Quartz driver