Ah, yes, this will most likely not work as-is with GitHub Flavored Markdown. I'm not sure why they do this, but GitHub strips class and style information from HTML tags in your Markdown document when processing it. (They also appear to strip some HTML tags themselves.)
For example, if you send GitHub
<div class="myclass"></div> it will return just
<div></div>, which breaks this little page break trick.
Off the top of my head, there is a not-so-elegant solution to the problem: Apply the page break style to an element type, rather than a specific class name. This way, you could insert a hidden element in your Markdown document (without giving it a class or style), and use your stylesheet to apply the style to all elements of that specific type. The important thing would be to make sure you select an element you aren't using in your document.
I just tested the following, which works with GitHub Flavored Markdown:
This is the first page
This is the second page
You don't necessarily have to use a
<div>, but I just tried it with a
<span> and GitHub completely stripped the
<span> tags out of the content.