webdav: fix directory detection when creating a remote
webdav: fix directory detection when creating a remote

Factor the is a directory check out and use it everywhere.

seuffert/rclone,olihey/rclone,yonjah/rclone,yonjah/rclone,B4dM4n/rclone,ncw/rclone,B4dM4n/rclone,ncw/rclone,olihey/rclone,seuffert/rclone,olihey/rclone,ncw/rclone,olihey/rclone,ncw/rclone,seuffert/rclone,B4dM4n/rclone,yonjah/rclone,seuffert/rclone,B4dM4n/rclone,yonjah/rclone