To change the direction of travel in Mach software, change the direction active high/low setting. This should allow the page up & page down keys to select the correct direction of travel.
It is possible that the drive direction pin (5v or 0v) signal is not repeatable or the logic level is at the borderline voltage at about 3.0 VDC if it is intermittant in operation. This is especially true if using a laptop computer without a breakout board that requires an external 5 volt power supply, and one is not using all active low outputs.
Verify operation of present system using g-code commands for the Z axis.
On my system using a Dell laptop, I have experienced problems where the page up and page down keys would not move the axis, but everything works normally while running g-code. Believe problem to be associated with laptop hardware.