Change logging and pid to use XDG cache dir