Adapts allocate_DIR() function and implements clone() system call. New allocate_DIR() does not work yet.