Fix some bugs and make our mkdir works now.