backport #202 to 0.9.x, fixes #279
Merge pull request #280 from obfuscurity/fix-log-mkdir

Backport #202 to 0.9.x, fixes #279