The include_images setting defaults to false in CLI. You need (at
least) include_images:true under [epub] in personal.ini or where ever
you've put your settings.
Setting path with fanficfare -o
'output_filename=books\${title}-${siteabbrev}_${storyId}${formatext}'
URL works for me. You need to properly quote and/or escape for your shell.
As for how you'd do that calling main(), you assemble the equivalent
list to the desired CLI params:
main(["-d","-o",
"output_filename=books/${title}-${siteabbrev}_${storyId}${formatext}",
"
test1.com?sid=5"])