Add missing include
Add createDirectory()
Move two utility functions to public interface