Creating directory works correctly