Fix recursive Ctags

Currently using `--ctags -R <dir>` produces tag output without filenames, making it useless for navigating between files.  This refactors the ctag output code somewhat; please read commit message for full description.