The folder for raster export needs to be automatically created, however the defaults are decided. If it's using a .img export to a folder, that folder needs to exist. For a filegdb, then that file gdb needs to exist.
One option also is to make sure that it can save the map document with a raster - make it not feature class specific (and if it's a raster, then don't have it symbolize, maybe have it have a different pipeline for the layer)
Original report by Nicholas Santos (Bitbucket: nickrsan, GitHub: nickrsan).
The folder for raster export needs to be automatically created, however the defaults are decided. If it's using a .img export to a folder, that folder needs to exist. For a filegdb, then that file gdb needs to exist.
One option also is to make sure that it can save the map document with a raster - make it not feature class specific (and if it's a raster, then don't have it symbolize, maybe have it have a different pipeline for the layer)