ensure target directory before attempting to open log files
re-instate `framework' logging via ct:log/2

Thanks to a patch from Peter Andersson