Off-spinner Sajid Khan continued to baffle West Indies on a turning wicket to bring Pakistan to the brink of victory in the first test.