Added options to set the chmod for files and directories