Fix NPE in mkdir()