You can golf out about 10 lines of this by getting rid of the table free. :)
I could have done a number of things to keep the line count down–in the spirit of the challenge I tried to keep it clean, pedantic, idiomatic POSIX C because if I didn't I'm sure someone would have jumped on it for it not being that :P So it's written in nano in the style of how I might write a homework assignment rather than something I specifically golfed. In retrospect the fixed-depth buckets probably added more complexity than they saved, and using a linked list or open addressing would have probably been much easier since it'd clean up some of the resizing and traversal code. Plus, the load factor was in general fairly poor, the final table (when I ran it on my Downlods folder) had just over 8 million buckets of depth 5 allocated and only about 600k got used at all, and of that 570k were filled just once.
Oh, and here's the results on my Downloads folder:
514464 Developer
425236 Xcode
386616 saagarjha
386075 Users
361324 Library
337374 build
333056 Wno
306758 WebKit
302892 DerivedData
296179 eugbibmfmfphgbhczsxiimkhynol
I have a couple WebKit build logs that dominated the results…