A permanent magnet trap for buffer gas cooled atoms