Fix setting of b:toplevel_cd to work with non-directories