Double slash suffix is removed.

When directory in complete list is exist on root directory it has double slash
as suffix. One from the complete function and another from compopt -o filename.
So, check directory is exist on root directory before append '/' to it. And
suppress appending '/' in such a case. Because '/' will be appended by compopt
option.
A little optimization is applied