Fix bugs in unlink.
Fix mkdir to malloc memory if it does not have enough on the stack.