Fix glob on empty folder for safe mode.