Testing the Reliability of a Hypercube and Folded Hypercube in the Presence of Random and Dynamic Faults