Hernan Perez scores on Pirates' errors after stealing 2nd