Sagbi bases with applications to blow-up algebras