Check whether directory exists