The second parameter lets us momentarily turn off debugging so that
this function can be used to test for the existence of a folder
without throwing an error. There's no FTP equivalent to is_dir()
so we do it by trying to change to a particular directory.
Internally, this parameter is only used by the "mirror" function below.