Fix chmod bug if folder does not exists