You can sort of do this already by sorting or arranging by “kind”. But you have to go to System Preferences > Spotlight and drag the folders category above your other document types (you don’t have to drag it all the way to the top). Basically, whenever you choose to sort/arrange something by kind, Finder will look at your Spotlight preferences. The only drawback is of course that it will affect your Spotlight main window as well.
I like the idea of Folders on Top. I've used "Arrange by Kind" but I was unaware of the Spotlight trick. Thanks for posting!