Third Division leaders Rangers were made to work hard for a 1-0 win over 10-man Peterhead, with Fran Sandaza netting a first-half winner.