Locke muffles Cardinals in Pirates' 9-0 win