Demonstration of a single-photon router with a cavity electromechanical system