Rebuild directories