Prevent PHP warnings while checking if a directory exists using WebDav

Close #6