Update to log handling

If logdest is not writable, then switch to logging to file in user's
directory.