fix
outdir option
add tests