Correct management of output_dir in libstruct

Closes #89 and makes @zzotta happy :-)