Cowboys upset Fergus to reach semis