Brentford's 21-year exile from the second tier ended on Friday after victory over Preston and a thriller at Wolves.