ensure log file and results file is writable (and create dirs if necessary)