improve log file handling

* move log files to ~/.cache/fview.log by default
* ensure the log file is writable