Fixed gf normal mode key for certain symlinks

On following symbolic links that target files by path that has symbolic
links to directories those symlinks to directories weren't recognized
as directories.

Thanks to filterfalse.
Minor style updates for remove_last_path_component
Greatly simplify running:follow_link()
Merge branch 'fix-gf-and-intermediate-symlinks'

Fix gf normal mode key on following symbolic links that target files by
path that has symbolic links to directories.

Thanks to filterfalse.