Add func to check if an ftp dir exists.

This is useful to check before walking or listing an non-existent
directory, which would raise an exception.