Updated safe glob to allow for ignoring files and dirs.