Check whether the given glob is valid

Right now, `.src()` allows invalid globs and will throw a `Cannot read property '0' of ...` error. This PR adds a proper error for this.