Police foil terror bid in Peshawar