If you use the op amp as an inverting amp, the negative input becomes positive at the opamp output. Also, a positive input signal stays positive (due to the diode being reverse-biased). So no negative supply is needed. Also, neither input will be dragged below zero volts, so the opamp is happy
Have a look at the attached cct. The single opamp inverts a negative signal and charges the cap if the input signal magnitude is greater than the voltage on the cap (just like a perfect diode). When the input is positive, it has little effect on the cap (200k charging/discharging the cap). Therefore it's basically a half-wave rectifier.
The 2 opamp cct has a similar rectifier cct but the output is buffered by a precision diode. So now both +ve & -ve parts of the input are used to update the value on the capacitor.
Enjoy!