In order to get page up and page down to work properly under Mac OSX Terminal, as well as the home and end of line, you need to go to Terminal Preferences and then Keyboard and configure the right escape key sequences:
Key Escape Sequence
Home \033OH
End \033OF
The O's are captital 'O's as in Omaha not 0/zero.