use relative images_dir argument

use the path relative to the project path. This ensures that generated
images (e.g. when using sprites) are stored in the specified images
directory.
Added test to verify that the image is generated in the correct location