changed dirpermission to string and conversion to octal