Added try-catches in permission detection to suppress permission-plugin-caused problems

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>