Create lock file to prevent more than one logout dialog (patch from Martin Thornton #456)