Affordable housing scheme in Masham wins £150,000 funding