Added mktmpdir funciont to compile script.