Store logs in our own directory; fix a logging bug.