First you need subl
at the command line. Use this:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
...which came from Sublime's documentation here.
Next, open (Apple)Script Editor and paste this in:
tell application "Finder"
set currentDir to (target of front Finder window) as text
end tell
do shell script "subl " & (quoted form of POSIX path of currentDir)
Go to File → Export...
and choose File Format: Application
and save it as an .app
.
Now navigate to that new app in the Finder, and command-drag (⌘-drag) the app into the Finder's toolbar. Right-click the Finder toolbar to customize or rearrange.
(This app opens the folder that the Finder is in. It ignores selection.)
Oh, optionally, if you want the Sublime icon: Get Info (⌘-i) on the Sublime app in the Finder, click the icon in the Get Info window, and ⌘-c to copy. Do the same on your new .app, and paste instead.