Question: Trouble Using Export Function in mpl Script

I am doing some work in Maple.  Specifically, I run the following commands in Maple worksheet mode:

with(Statistics);
L := abs(RandomVariable(UniformDistribution(0, 1)) - RandomVariable(UniformDistribution(0, 1)));
Export("LineDensity.jpg", DensityPlot(L));
PDF(L, x);

Everything works fine.  When I export these commands into an MPL script, I get the following:

with(Statistics);
L := abs(RandomVariable(UniformDistribution(0, 1)) - RandomVariable(UniformDistribution(0, 1)));
Export("LineDensity.jpg", DensityPlot(L));
PDF(L, x);
NULL;

When I execute this script, I get the following error message:

Warning: persistent store makes readlib obsolete
Error: (in Export) exported file LineDensity.jpg could not be created

I need to do the work in MPL script form so that I can have larger problems processed.  Does anyone know why I would be having this problem with the Export function?  

Please Wait...