Test beam performance measurements for the Phase I upgrade of the CMS pixel detector