fix zombie issue

That was issue when mplayer during recording exits prematurely, before
hitting stop, then when hitting stop it won't stop the actual
recording, only when hitting a second time.
Mylock: only create tmpdir if needed