It appears, from many Google results I did regarding this same question, that either form is acceptable, and it is written either way. Most notable example of the two-word version is the play "Master Class" about Maria Callas. Personally, I prefer two words. If written, master class is not normally capitalized as it is not a proper noun ("I went to master class today."). If using it in advertising, for example, for a master class with a specific person, I would capitalize both words as it would then be a formal title ("Please register to attend the Marilyn Horne Master Class.").