smartcd_export: fix endless loop with $fn becoming "/" always

This occurred with zsh 5.0.6-dev, which apparently adds a trailing slash
to the `"$base/$dir/"*` glob.