Fixed some problems with mkdir.. I think checks ISDIR correctly now