A sample-path large deviation principle for dynamic Erdös-Rényi random graphs