There is no problem with the prepare.tex file as per your MWE. It gets created properly. Have a look at that file with a text editor.
–
Peter GrillJul 29 '12 at 8:05

1

The package mwe is needed to get the graphics example-image-a and example-image-b
–
Marco DanielJul 29 '12 at 8:19

@MarcoDaniel: No need, graphicx already provides us with them out of the box I think.
–
stalking isn't toleratedJul 29 '12 at 8:22

1

you don't need to load mwe into the document but you need to have installed mwe (or at least extracted the images from the mwe distribution and placed them in the input path)
–
David CarlisleJul 29 '12 at 9:29