lock: Create dir if it does not exist