fix a bug where directories were created in capital case;