rebuild directory structure