fixed trailling slash adder to output_dir, it was adding to blank output dirs, becoming an absolute path