Remove unused var
Use the mntlock for the save debug dump

Ticket:	#5422
(cherry picked from commit 673eb58d20cc1a3dab9c287497dac320ff80f12b)

Conflicts:
	gui/system/views.py
Make sure ixdiagnose output dir doesn't exist

Ticket:	#5422
(cherry picked from commit a2dbdcf553665fab4f5df5ec04dcf2dceb327279)