Add directory creation, fix #44