Validity of nonequilibrium work relations for the rapidly expanding quantum piston