Using cwd to set the log directory is not valid after accepting pull

request #135.