Create tmp and log dirs before everything