Checks for whether directory exists