The drugstore giant has agreed to sweeten its refund policy after prosecutors accused the chain of charging customers more than prices posted on store shelves.