Keyguard: fix nasty file handle leak

Change-Id: I47d58392d9d00a2cb843cf8bd51d6390ad1334a7
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>